From 0a1dfb51b8182275ef77ccf5f2a54b7374d57d16 Mon Sep 17 00:00:00 2001 From: Lee Spottiswood Date: Mon, 18 May 2020 08:43:13 +0100 Subject: [PATCH] add DRaaS service to client --- pkg/client/client.go | 50 +++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/pkg/client/client.go b/pkg/client/client.go index ded10bc..3ceeed9 100644 --- a/pkg/client/client.go +++ b/pkg/client/client.go @@ -4,6 +4,7 @@ import ( "github.com/ukfast/sdk-go/pkg/connection" "github.com/ukfast/sdk-go/pkg/service/account" "github.com/ukfast/sdk-go/pkg/service/ddosx" + "github.com/ukfast/sdk-go/pkg/service/draas" "github.com/ukfast/sdk-go/pkg/service/ecloud" "github.com/ukfast/sdk-go/pkg/service/ltaas" "github.com/ukfast/sdk-go/pkg/service/pss" @@ -14,15 +15,16 @@ import ( ) type Client interface { - SafeDNSService() safedns.SafeDNSService - ECloudService() ecloud.ECloudService - SSLService() ssl.SSLService - DDoSXService() ddosx.DDoSXService AccountService() account.AccountService - RegistrarService() registrar.RegistrarService + DDoSXService() ddosx.DDoSXService + DRaaSService() draas.DRaaSService + ECloudService() ecloud.ECloudService + LTaaSService() ltaas.LTaaSService PSSService() pss.PSSService + RegistrarService() registrar.RegistrarService + SafeDNSService() safedns.SafeDNSService + SSLService() ssl.SSLService StorageService() storage.StorageService - LTaaSService() ltaas.LTaaSService } type UKFastClient struct { @@ -35,38 +37,42 @@ func NewClient(connection connection.Connection) *UKFastClient { } } -func (c *UKFastClient) SafeDNSService() safedns.SafeDNSService { - return safedns.NewService(c.connection) +func (c *UKFastClient) AccountService() account.AccountService { + return account.NewService(c.connection) } -func (c *UKFastClient) ECloudService() ecloud.ECloudService { - return ecloud.NewService(c.connection) +func (c *UKFastClient) DDoSXService() ddosx.DDoSXService { + return ddosx.NewService(c.connection) } -func (c *UKFastClient) SSLService() ssl.SSLService { - return ssl.NewService(c.connection) +func (c *UKFastClient) DRaaSService() draas.DRaaSService { + return draas.NewService(c.connection) } -func (c *UKFastClient) DDoSXService() ddosx.DDoSXService { - return ddosx.NewService(c.connection) +func (c *UKFastClient) ECloudService() ecloud.ECloudService { + return ecloud.NewService(c.connection) } -func (c *UKFastClient) AccountService() account.AccountService { - return account.NewService(c.connection) +func (c *UKFastClient) LTaaSService() ltaas.LTaaSService { + return ltaas.NewService(c.connection) +} + +func (c *UKFastClient) PSSService() pss.PSSService { + return pss.NewService(c.connection) } func (c *UKFastClient) RegistrarService() registrar.RegistrarService { return registrar.NewService(c.connection) } -func (c *UKFastClient) PSSService() pss.PSSService { - return pss.NewService(c.connection) +func (c *UKFastClient) SafeDNSService() safedns.SafeDNSService { + return safedns.NewService(c.connection) } -func (c *UKFastClient) StorageService() storage.StorageService { - return storage.NewService(c.connection) +func (c *UKFastClient) SSLService() ssl.SSLService { + return ssl.NewService(c.connection) } -func (c *UKFastClient) LTaaSService() ltaas.LTaaSService { - return ltaas.NewService(c.connection) +func (c *UKFastClient) StorageService() storage.StorageService { + return storage.NewService(c.connection) }