Versions in this module Expand all Collapse all v0 v0.1.4 Apr 1, 2023 Changes in this version + const BASE_PATH + const HOST_NAME + const SCHEME + const UA + const VERSION + var ErrMissingDNSRecordID = errors.New(errMissingDNSRecordID) + var ErrMissingDomain = errors.New(errMissingDomain) + func PrettyPrint(data interface{}) + type API struct + APIEmail string + APIKey string + BaseURL string + Debug bool + UserAgent string + func New(token string, opts ...Option) (*API, error) + func (api *API) CreateDNSRecord(ctx context.Context, resource Resource, record CreateDNSRecordParams) (res *CreateDNSRecord_Response, err error) + func (api *API) DeleteDNSRecord(ctx context.Context, resource Resource, recordID string) (*DeleteDNSRecord_Response, error) + func (api *API) GetDNSRecord(ctx context.Context, resource Resource, recordID string) (*DNSRecord, error) + func (api *API) ListDNSRecords(ctx context.Context, resource Resource, params ListDNSRecordsParams) ([]DNSRecord, error) + func (api *API) UpdateDNSRecord(ctx context.Context, resource Resource, recordID string, ...) (*UpdateDNSRecord_Response, error) + type CreateDNSRecordParams struct + Cloud bool + IPFilterMode interface{} + Name string + TTL int + Type string + UpstreamHTTPS string + Value interface{} + type CreateDNSRecord_Response struct + Data interface{} + Errors map[string][]string + Message string + Status bool + type DNSRecord struct + Cloud bool + CreatedAt string + ID string + IPFilterMode interface{} + IsProtected bool + Name string + TTL int + Type string + UpdatedAt string + UpstreamHTTPS string + Value interface{} + type DNSRecord_IPFilterMode struct + Count string + GeoFilter string + Order string + type DNSRecord_Response struct + Data DNSRecord + type DNSRecord_Value_A struct + Country string + IP string + Port int + Weight int + type DNSRecord_Value_AAAA = DNSRecord_Value_A + type DNSRecord_Value_ANAME struct + HostHeader string + Location string + Port int + type DNSRecord_Value_CAA struct + Tag string + Value string + type DNSRecord_Value_CNAME struct + Host string + HostHeader string + Port int + type DNSRecord_Value_DKIM = DNSRecord_Value_TXT + type DNSRecord_Value_MX struct + Host string + Priority int + type DNSRecord_Value_NS struct + Host string + type DNSRecord_Value_PTR struct + Domain string + type DNSRecord_Value_SPF = DNSRecord_Value_TXT + type DNSRecord_Value_SRV struct + Port int + Priority int + Target string + Weight int + type DNSRecord_Value_TLSA struct + Certificate string + MatchingType string + Selector string + Usage string + type DNSRecord_Value_TXT struct + Text string + type DeleteDNSRecord_Response = CreateDNSRecord_Response + type Error struct + Code int + Errors map[string][]string + Message string + Type ErrorType + func (e Error) Error() string + type ErrorType string + const ErrorTypeAuthentication + const ErrorTypeAuthorization + const ErrorTypeNotFound + const ErrorTypeRateLimit + const ErrorTypeRequest + const ErrorTypeService + type ListDNSRecord_Response struct + Data []DNSRecord + Links interface{} + Meta interface{} + type ListDNSRecordsParams struct + Page int + PerPage int + Search string + Type string + type Logger interface + Printf func(format string, v ...interface{}) + type Option func(*API) error + func Debug(debug bool) Option + func Headers(headers http.Header) Option + func UserAgent(userAgent string) Option + func UsingRateLimit(rps float64) Option + func UsingRetryPolicy(maxRetries int, minRetryDelaySecs int, maxRetryDelaySecs int) Option + type RequestError struct + func NewRequestError(e *Error) RequestError + func (e RequestError) Error() string + func (e RequestError) ErrorCode() int + func (e RequestError) ErrorMessage() string + func (e RequestError) Errors() map[string][]string + func (e RequestError) Type() ErrorType + type Resource struct + Domain string + func ResourceDomain(domain string) Resource + type RetryPolicy struct + MaxRetries int + MaxRetryDelay time.Duration + MinRetryDelay time.Duration + type ServiceError struct + func NewServiceError(e *Error) ServiceError + func (e ServiceError) Error() string + func (e ServiceError) ErrorCode() int + func (e ServiceError) ErrorMessage() string + func (e ServiceError) Errors() map[string][]string + func (e ServiceError) Type() ErrorType + type UpdateDNSRecordParams = CreateDNSRecordParams + type UpdateDNSRecord_Response = CreateDNSRecord_Response v0.1.3 Mar 25, 2023 v0.1.2 Mar 25, 2023 v0.1.1 Mar 25, 2023 v0.1.0 Mar 24, 2023