Update lego
This commit is contained in:
parent
65284441fa
commit
a3b95f798b
61 changed files with 3453 additions and 1536 deletions
70
vendor/github.com/dnsimple/dnsimple-go/dnsimple/services_domains.go
generated
vendored
Normal file
70
vendor/github.com/dnsimple/dnsimple-go/dnsimple/services_domains.go
generated
vendored
Normal file
|
@ -0,0 +1,70 @@
|
|||
package dnsimple
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func domainServicesPath(accountID string, domainID string, serviceIdentifier string) string {
|
||||
if serviceIdentifier != "" {
|
||||
return fmt.Sprintf("/%v/domains/%v/services/%v", accountID, domainID, serviceIdentifier)
|
||||
}
|
||||
return fmt.Sprintf("/%v/domains/%v/services", accountID, domainID)
|
||||
}
|
||||
|
||||
// DomainServiceSettings represents optional settings when applying a DNSimple one-click service to a domain.
|
||||
type DomainServiceSettings struct {
|
||||
Settings map[string]string `url:"settings,omitempty"`
|
||||
}
|
||||
|
||||
// AppliedServices lists the applied one-click services for a domain.
|
||||
//
|
||||
// See https://developer.dnsimple.com/v2/services/domains/#applied
|
||||
func (s *ServicesService) AppliedServices(accountID string, domainID string, options *ListOptions) (*servicesResponse, error) {
|
||||
path := versioned(domainServicesPath(accountID, domainID, ""))
|
||||
servicesResponse := &servicesResponse{}
|
||||
|
||||
path, err := addURLQueryOptions(path, options)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
resp, err := s.client.get(path, servicesResponse)
|
||||
if err != nil {
|
||||
return servicesResponse, err
|
||||
}
|
||||
|
||||
servicesResponse.HttpResponse = resp
|
||||
return servicesResponse, nil
|
||||
}
|
||||
|
||||
// ApplyService applies a one-click services to a domain.
|
||||
//
|
||||
// See https://developer.dnsimple.com/v2/services/domains/#apply
|
||||
func (s *ServicesService) ApplyService(accountID string, serviceIdentifier string, domainID string, settings DomainServiceSettings) (*serviceResponse, error) {
|
||||
path := versioned(domainServicesPath(accountID, domainID, serviceIdentifier))
|
||||
serviceResponse := &serviceResponse{}
|
||||
|
||||
resp, err := s.client.post(path, settings, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
serviceResponse.HttpResponse = resp
|
||||
return serviceResponse, nil
|
||||
}
|
||||
|
||||
// UnapplyService unapplies a one-click services from a domain.
|
||||
//
|
||||
// See https://developer.dnsimple.com/v2/services/domains/#unapply
|
||||
func (s *ServicesService) UnapplyService(accountID string, serviceIdentifier string, domainID string) (*serviceResponse, error) {
|
||||
path := versioned(domainServicesPath(accountID, domainID, serviceIdentifier))
|
||||
serviceResponse := &serviceResponse{}
|
||||
|
||||
resp, err := s.client.delete(path, nil, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
serviceResponse.HttpResponse = resp
|
||||
return serviceResponse, nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue