mirror of
https://github.com/go-acme/lego.git
synced 2024-12-21 23:06:56 +02:00
bba134ce87
* feat: add GetOrDefaultXXX methods. * refactor: configuration (alidns). * refactor: configuration (azure). * refactor: configuration (auroradns). * refactor: configuration (bluecat). * refactor: configuration (cloudflare). * refactor: configuration (digitalocean). * refactor: configuration (dnsimple). * refactor: configuration (dnmadeeasy). * refactor: configuration (dnspod). * refactor: configuration (duckdns). * refactor: configuration (dyn). * refactor: configuration (exoscale). * refactor: configuration (fastdns). * refactor: configuration (gandi). * refactor: configuration (gandiv5). * refactor: configuration (gcloud). * refactor: configuration (glesys). * refactor: configuration (godaddy). * refactor: configuration (iij). * refactor: configuration (lightsail). * refactor: configuration (linode). * refactor: configuration (namecheap). * refactor: configuration (namedotcom). * refactor: configuration (netcup). * refactor: configuration (nifcloud). * refactor: configuration (ns1). * refactor: configuration (otc). * refactor: configuration (ovh). * refactor: configuration (pdns). * refactor: configuration (rackspace). * refactor: configuration (rfc2136). * refactor: configuration (route53). * refactor: configuration (sakuracloud). * refactor: configuration (vegadns). * refactor: configuration (vultr).
27 lines
698 B
Go
27 lines
698 B
Go
package digitalocean
|
|
|
|
const defaultBaseURL = "https://api.digitalocean.com"
|
|
|
|
// txtRecordRequest represents the request body to DO's API to make a TXT record
|
|
type txtRecordRequest struct {
|
|
RecordType string `json:"type"`
|
|
Name string `json:"name"`
|
|
Data string `json:"data"`
|
|
TTL int `json:"ttl"`
|
|
}
|
|
|
|
// txtRecordResponse represents a response from DO's API after making a TXT record
|
|
type txtRecordResponse struct {
|
|
DomainRecord struct {
|
|
ID int `json:"id"`
|
|
Type string `json:"type"`
|
|
Name string `json:"name"`
|
|
Data string `json:"data"`
|
|
} `json:"domain_record"`
|
|
}
|
|
|
|
type digitalOceanAPIError struct {
|
|
ID string `json:"id"`
|
|
Message string `json:"message"`
|
|
}
|