internal

package
v0.0.0-...-d25b310 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIResponse

type APIResponse struct {
	Status  string              `json:"status,omitempty"`
	Details map[string][]string `json:"errors,omitempty"`
}

func (APIResponse) Error

func (a APIResponse) Error() string

type Client

type Client struct {
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient(apiKey string) *Client

func (Client) AddRecord

func (c Client) AddRecord(ctx context.Context, domainID int, record Record) error

func (Client) DeleteRecord

func (c Client) DeleteRecord(ctx context.Context, domainID, recordID int) error

func (Client) GetDomains

func (c Client) GetDomains(ctx context.Context) ([]Domain, error)

func (Client) GetRecords

func (c Client) GetRecords(ctx context.Context, domainID int) ([]Record, error)

func (Client) UpdateRecord

func (c Client) UpdateRecord(ctx context.Context, domainID, recordID int, record Record) error

type Domain

type Domain struct {
	ID          int    `json:"id,omitempty"`
	UnicodeFqdn string `json:"unicode_fqdn,omitempty"`
	Domain      string `json:"domain,omitempty"`
	TLD         string `json:"tld,omitempty"`
	Status      string `json:"status,omitempty"`
}

type DomainsResponse

type DomainsResponse struct {
	Data []Domain `json:"domains,omitempty"`
}

type NameserverRecordPayload

type NameserverRecordPayload struct {
	Data Record `json:"nameserver_record,omitempty"`
}

type Record

type Record struct {
	ID      int    `json:"id,omitempty"`
	Name    string `json:"name,omitempty"`
	Content string `json:"content,omitempty"`
	TTL     int    `json:"ttl,omitempty"`
	Type    string `json:"type,omitempty"`
}

type RecordsResponse

type RecordsResponse struct {
	Data []Record `json:"records,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL