Versions in this module Expand all Collapse all v0 v0.1.1 Dec 25, 2022 v0.1.0 Aug 30, 2022 Changes in this version + const Endpoint + const UserAgent + const Version + type Client struct + PrimaryServer *PrimaryServerClient + 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 WithDebugWriter(wr io.Writer) ClientOption + func WithEndpoint(url string) ClientOption + func WithHTTPClient(httpClient *http.Client) ClientOption + func WithToken(token string) ClientOption + type ListOpts struct + Page int + PerPage int + type Meta struct + Pagination *Pagination + type Pagination struct + LastPage int + Page int + PerPage int + TotalEntries int + func PaginationFromSchema(s schema.MetaPagination) Pagination + type PrimaryServer struct + Address string + Created time.Time + ID string + Modified time.Time + Port int + Zone *Zone + func PrimaryServerFromSchema(s schema.PrimaryServer) *PrimaryServer + type PrimaryServerClient struct + func (c PrimaryServerClient) Create(ctx context.Context, opts PrimaryServerCreateOpts) (*PrimaryServer, *Response, error) + func (c PrimaryServerClient) Delete(ctx context.Context, server *PrimaryServer) (*Response, error) + func (c PrimaryServerClient) GetByID(ctx context.Context, id string) (*PrimaryServer, *Response, error) + func (c PrimaryServerClient) List(ctx context.Context, opts PrimaryServerListOpts) ([]*PrimaryServer, *Response, error) + func (c PrimaryServerClient) Update(ctx context.Context, server *PrimaryServer, opts PrimaryServerUpdateOpts) (*PrimaryServer, *Response, error) + type PrimaryServerCreateOpts struct + Address string + Port int + ZoneID string + type PrimaryServerListOpts struct + ZoneID string + type PrimaryServerUpdateOpts struct + Address string + Port int + ZoneID string + type Record struct + Created time.Time + ID string + Modified time.Time + Name string + Ttl int + Type RecordType + Value string + Zone *Zone + func RecordFromSchema(s schema.Record) *Record + type RecordBulkCreateResponse struct + InvalidRecords []*RecordEntry + Records []*Record + ValidRecords []*RecordEntry + type RecordBulkUpdateOpts struct + ID string + Name string + Ttl *int + Type RecordType + Value string + Zone *Zone + type RecordBulkUpdateResponse struct + FailedRecords []*RecordEntry + Records []*Record + type RecordClient struct + func (c RecordClient) BulkCreate(ctx context.Context, bulkOpts []RecordCreateOpts) (*RecordBulkCreateResponse, *Response, error) + func (c RecordClient) BulkUpdate(ctx context.Context, bulkOpts []RecordBulkUpdateOpts) (*RecordBulkUpdateResponse, *Response, error) + func (c RecordClient) Create(ctx context.Context, opts RecordCreateOpts) (*Record, *Response, error) + func (c RecordClient) Delete(ctx context.Context, rec *Record) (*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, rec *Record, opts RecordUpdateOpts) (*Record, *Response, error) + type RecordCreateOpts struct + Name string + Ttl *int + Type RecordType + Value string + Zone *Zone + type RecordEntry struct + Name string + Ttl *int + Type RecordType + Value string + ZoneID string + func RecordEntryFromSchema(s schema.RecordBulkEntry) *RecordEntry + type RecordListOpts struct + ZoneID string + type RecordType string + const RecordTypeA + const RecordTypeAAAA + const RecordTypeCAA + const RecordTypeCNAME + const RecordTypeDANE + const RecordTypeDS + const RecordTypeHINFO + const RecordTypeMX + const RecordTypeNS + const RecordTypePTR + const RecordTypeRP + const RecordTypeSOA + const RecordTypeSRV + const RecordTypeTLSA + const RecordTypeTXT + type RecordUpdateOpts struct + Name string + Ttl *int + Type RecordType + Value string + Zone *Zone + type Response struct + Meta Meta + type TxtVerification struct + Name string + Token string + func TxtVerificationFromSchema(s schema.TxtVerification) *TxtVerification + type ValidatedZoneFile struct + PassedRecords int + ValidRecords []*Record + func ValidateZoneFileFromSchema(s schema.ValidateZoneFileResponse) *ValidatedZoneFile + type Zone struct + Created time.Time + ID string + IsSecondaryDNS bool + LegacyDNSHost string + LegacyNS []string + Modified time.Time + NS []string + Name string + Owner string + Paused bool + Permission string + Project string + RecordsCount int + Registrar string + Status ZoneStatus + Ttl int + TxtVerification *TxtVerification + Verified time.Time + func ZoneFromSchema(s schema.Zone) *Zone + type ZoneClient struct + func (c ZoneClient) Create(ctx context.Context, opts ZoneCreateOpts) (*Zone, *Response, error) + func (c ZoneClient) Delete(ctx context.Context, zone *Zone) (*Response, error) + func (c ZoneClient) Export(ctx context.Context, zone *Zone) (io.Reader, *Response, error) + func (c ZoneClient) GetByID(ctx context.Context, id string) (*Zone, *Response, error) + func (c ZoneClient) Import(ctx context.Context, zone *Zone, file io.Reader) (*Zone, *Response, error) + func (c ZoneClient) List(ctx context.Context, opts ZoneListOpts) ([]*Zone, *Response, error) + func (c ZoneClient) Update(ctx context.Context, zone *Zone, opts ZoneUpdateOpts) (*Zone, *Response, error) + func (c ZoneClient) ValidateFile(ctx context.Context, file io.Reader) (*ValidatedZoneFile, *Response, error) + type ZoneCreateOpts struct + Name string + Ttl *int + func (o ZoneCreateOpts) Validate() error + type ZoneListOpts struct + Name string + SearchName string + type ZoneStatus string + const ZoneStatusFailed + const ZoneStatusPending + const ZoneStatusVerified + type ZoneUpdateOpts struct + Name string + Ttl *int + func (o ZoneUpdateOpts) Validate() error