feat: domain/storage/billing/config cmds + rainyun domain/storage/billing services
This commit is contained in:
@@ -12,8 +12,11 @@ func init() {
|
||||
|
||||
// Rainyun provider — 雨云 cloud platform.
|
||||
type Rainyun struct {
|
||||
client *client
|
||||
server *ServerService
|
||||
client *client
|
||||
server *ServerService
|
||||
domain *DomainService
|
||||
storage *StorageService
|
||||
billing *BillingService
|
||||
}
|
||||
|
||||
// New creates a Rainyun provider from config.
|
||||
@@ -21,6 +24,9 @@ func New(cfg provider.ProviderConfig) (provider.Provider, error) {
|
||||
c := newClient(cfg.Endpoint, cfg.APIKey)
|
||||
r := &Rainyun{client: c}
|
||||
r.server = &ServerService{client: c}
|
||||
r.domain = &DomainService{client: c}
|
||||
r.storage = &StorageService{client: c}
|
||||
r.billing = &BillingService{client: c}
|
||||
return r, nil
|
||||
}
|
||||
|
||||
@@ -39,7 +45,7 @@ func (r *Rainyun) Server() provider.ServerService {
|
||||
}
|
||||
return r.server
|
||||
}
|
||||
func (r *Rainyun) Domain() provider.DomainService { return nil }
|
||||
func (r *Rainyun) Storage() provider.StorageService { return nil }
|
||||
func (r *Rainyun) Domain() provider.DomainService { return r.domain }
|
||||
func (r *Rainyun) Storage() provider.StorageService { return r.storage }
|
||||
func (r *Rainyun) CDN() provider.CDNService { return nil }
|
||||
func (r *Rainyun) Billing() provider.BillingService { return nil }
|
||||
func (r *Rainyun) Billing() provider.BillingService { return r.billing }
|
||||
|
||||
Reference in New Issue
Block a user