Documentation
¶
Index ¶
- Variables
- type CNAMEAPIError
- type CNAMERecord
- type CNAMERecordList
- type Client
- func (c *Client) Delete(ctx context.Context, path string) (*http.Response, error)
- func (c *Client) Get(ctx context.Context, path string) (*http.Response, error)
- func (c *Client) Post(ctx context.Context, path string, body interface{}) (*http.Response, error)
- func (c *Client) Put(ctx context.Context, path string, body interface{}) (*http.Response, error)
- func (c *Client) Request(ctx context.Context, vals url.Values) (*http.Request, error)
- type Config
- type DNSAPIError
- type DNSRecord
- type DNSRecordList
- type LocalCNAME
- type LocalDNS
- type Session
- type SessionAPI
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorSessionNotFound = errors.New("session not found") ErrorSessionBadRequest = errors.New("bad session request") ErrorSessionTooManyRequests = errors.New("too many session requests") )
View Source
var ErrClientValidation = errors.New("invalid client configuration")
View Source
var (
ErrorLocalCNAMENotFound = errors.New("local CNAME record not found")
)
View Source
var (
ErrorLocalDNSNotFound = errors.New("local dns record not found")
)
Functions ¶
This section is empty.
Types ¶
type CNAMEAPIError ¶ added in v1.0.1
func (*CNAMEAPIError) Error ¶ added in v1.0.1
func (e *CNAMEAPIError) Error() string
type CNAMERecord ¶
type CNAMERecordList ¶
type CNAMERecordList []CNAMERecord
type Client ¶
type Client struct {
LocalDNS LocalDNS
LocalCNAME LocalCNAME
SessionAPI SessionAPI
// contains filtered or unexported fields
}
type DNSAPIError ¶ added in v1.0.1
func (*DNSAPIError) Error ¶ added in v1.0.1
func (e *DNSAPIError) Error() string
type DNSRecordList ¶
type DNSRecordList []DNSRecord
type LocalCNAME ¶
type LocalCNAME interface {
// List all CNAME records.
List(ctx context.Context) (CNAMERecordList, error)
// Create a CNAME record.
Create(ctx context.Context, domain string, target string) (*CNAMERecord, error)
// CreateRecord creates a CNAME record using the provided record definition.
CreateRecord(ctx context.Context, record *CNAMERecord) (*CNAMERecord, error)
// Get a CNAME record by its domain.
Get(ctx context.Context, domain string) (*CNAMERecord, error)
// Delete a CNAME record by its domain.
Delete(ctx context.Context, domain string) error
}
type LocalDNS ¶
type LocalDNS interface {
// List all DNS records.
List(ctx context.Context) (DNSRecordList, error)
// Create a DNS record.
Create(ctx context.Context, domain string, IP string) (*DNSRecord, error)
// Get a DNS record by its domain.
Get(ctx context.Context, domain string) (*DNSRecord, error)
// Delete a DNS record by its domain.
Delete(ctx context.Context, domain string) error
}
Click to show internal directories.
Click to hide internal directories.