Versions in this module Expand all Collapse all v0 v0.4.0 Jul 2, 2020 v0.3.1 Jul 2, 2020 v0.3.0 Jul 2, 2020 Changes in this version + const Endpoint + const UserAgent + const Version + func IsError(err error, code ErrorCode) bool + type BackoffFunc func(retries int) time.Duration + func ConstantBackoff(d time.Duration) BackoffFunc + func ExponentialBackoff(b float64, d time.Duration) BackoffFunc + type BaseRecord struct + Name string + TTL int + Type string + Value string + ZoneID string + func BaseRecordFromSchema(s schema.BaseRecord) *BaseRecord + func BaseRecordsFromSchema(s []schema.BaseRecord) []*BaseRecord + type Client struct + Record RecordClient + Zone ZoneClient + func NewClient(options ...ClientOption) *Client + func (c *Client) Do(r *http.Request, v interface{}) (*Response, error) + func (c *Client) NewRequest(ctx context.Context, method, path string, body io.Reader) (*http.Request, error) + type ClientOption func(*Client) + func WithApplication(name, version string) ClientOption + func WithBackoffFunc(f BackoffFunc) ClientOption + func WithDebugWriter(debugWriter io.Writer) ClientOption + func WithEndpoint(endpoint string) ClientOption + func WithPollInterval(pollInterval time.Duration) ClientOption + func WithToken(token string) ClientOption + type Error struct + Code ErrorCode + Details interface{} + Message string + func ErrorFromSchema(s schema.Error) Error + func (e Error) Error() string + type ErrorCode int + const ErrorCodeNotFound + const ErrorCodeRateLimitExceeded + type ErrorDetailsInvalidInput struct + Fields []ErrorDetailsInvalidInputField + type ErrorDetailsInvalidInputField struct + Messages []string + Name string + type ListOpts struct + Page int + PerPage int + type Meta struct + Pagination *Pagination + Ratelimit Ratelimit + type Pagination struct + LastPage int + NextPage int + Page int + PerPage int + PreviousPage int + TotalEntries int + func PaginationFromSchema(s schema.MetaPagination) Pagination + type Ratelimit struct + Limit int + Remaining int + Reset time.Time + type Record struct + Created schema.Time + ID string + Modified schema.Time + func RecordFromSchema(s schema.Record) *Record + func RecordsFromSchema(s []schema.Record) []*Record + type RecordBulkCreateOpts struct + Records []RecordCreateOpts + type RecordBulkCreateResult struct + InvalidRecords []*BaseRecord + Records []*Record + ValidRecords []*BaseRecord + type RecordBulkUpdateOpts struct + Records []RecordUpdateOpts + type RecordBulkUpdateResult struct + FailedRecords []*BaseRecord + Records []*Record + type RecordClient struct + func (c *RecordClient) All(ctx context.Context) ([]*Record, error) + func (c *RecordClient) BulkCreate(ctx context.Context, opts RecordBulkCreateOpts) (RecordBulkCreateResult, *Response, error) + func (c *RecordClient) BulkUpdate(ctx context.Context, opts RecordBulkUpdateOpts) (RecordBulkUpdateResult, *Response, error) + func (c *RecordClient) Create(ctx context.Context, opts RecordCreateOpts) (*Record, *Response, error) + func (c *RecordClient) Delete(ctx context.Context, id string) (*Response, error) + func (c *RecordClient) GetByID(ctx context.Context, id string) (*Record, *Response, error) + func (c *RecordClient) List(ctx context.Context, opts RecordListOpts) ([]*Record, *Response, error) + func (c *RecordClient) Update(ctx context.Context, id string, opts RecordUpdateOpts) (*Record, *Response, error) + type RecordCreateOpts struct + Name string + TTL int + Type string + Value string + ZoneID string + type RecordListOpts struct + ZoneID string + type RecordUpdateOpts struct + Name string + TTL int + Type string + Value string + ZoneID string + type Response struct + Meta Meta + type Zone struct + Created schema.Time + ID string + IsSecondaryDNS bool + LegacyDNSHost string + LegacyNS []string + Modified schema.Time + NS []string + Name string + Owner string + Paused bool + Permission string + Project string + RecordsCount int + Registrar string + Status string + TTL int + TXTVerification ZoneTxtVerification + Verified schema.Time + func ZoneFromSchema(s schema.Zone) *Zone + type ZoneClient struct + func (c *ZoneClient) All(ctx context.Context) ([]*Zone, error) + func (c *ZoneClient) Create(ctx context.Context, opts ZoneCreateOpts) (*Zone, *Response, error) + func (c *ZoneClient) Delete(ctx context.Context, id string) (*Response, error) + func (c *ZoneClient) GetByID(ctx context.Context, id string) (*Zone, *Response, error) + func (c *ZoneClient) Update(ctx context.Context, id string, opts ZoneUpdateOpts) (*Zone, *Response, error) + type ZoneCreateOpts struct + Name string + TTL int + type ZoneTxtVerification struct + Name string + Token string + type ZoneUpdateOpts struct + Name string + TTL int