Skip to content

Commit

Permalink
add DRaaS service to client
Browse files Browse the repository at this point in the history
  • Loading branch information
0x4c6565 committed May 18, 2020
1 parent 0f4bca4 commit 0a1dfb5
Showing 1 changed file with 28 additions and 22 deletions.
50 changes: 28 additions & 22 deletions pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 {
Expand All @@ -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)
}

0 comments on commit 0a1dfb5

Please sign in to comment.