api

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(apiKey string, httpClient *http.Client) (*Client, error)

func (*Client) AddDNSRecord

func (c *Client) AddDNSRecord(ctx context.Context, record DNSRecordInput) error

func (*Client) ListDNSRecords

func (c *Client) ListDNSRecords(ctx context.Context) ([]DNSRecord, error)

func (*Client) RemoveDNSRecord added in v0.1.1

func (c *Client) RemoveDNSRecord(ctx context.Context, record DNSRecordInput) error

type DNSRecord

type DNSRecord struct {
	Comment   string     `json:"comment"`
	AccountID string     `json:"account_id"` // nolint:tagliatelle
	Zone      string     `json:"zone"`
	Record    string     `json:"record"`
	Value     string     `json:"value"`
	Type      RecordType `json:"type"`
	Editable  Editing    `json:"editable"`
}

type DNSRecordInput

type DNSRecordInput struct {
	Record string     `url:"record" json:"record"`
	Value  string     `url:"value" json:"value"`
	Type   RecordType `url:"type" json:"type"`
}

type Editing

type Editing string
const (
	NotEditable Editing = "0"

	Editable Editing = "1"
)

type RecordType

type RecordType string
const (
	CNAMERecordType RecordType = "CNAME"
	ARecordType     RecordType = "A"
	NSRecordType    RecordType = "NS"
	NAPTRRecordType RecordType = "NAPTR"
	SRVRecordType   RecordType = "SRV"
	TXTRecordType   RecordType = "TXT"
	AAAARecordType  RecordType = "AAAA"
)

Jump to

Keyboard shortcuts

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