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
}
Client is a struct containing Porkbun API Key and Secret.
func (*Client) CreateOrEditRecord ¶
func (c *Client) CreateOrEditRecord(ctx context.Context, zone string, record HostRecord) (HostRecord, error)
CreateOrEditRecord creates or edits a DNS Host Record using the Porkbun API.
func (*Client) DeleteRecord ¶
DeleteRecord deletes a DNS Host Record using the Porkbun API
func (*Client) GetHostRecords ¶
GetHostRecords retrieves all existing DNS Host Records using the Porkbun API.
type HostRecord ¶
type HostRecord struct { ID string `json:"id,omitempty"` Name string `json:"name"` RecordType RecordType `json:"type"` Content string `json:"content"` TTL uint16 `json:"ttl,string"` Priority string `json:"priority"` Notes string `json:"notes"` }
HostRecord is a struct that contains all the details of a DNS record required by the Porkbun API.
type RecordType ¶
type RecordType string
RecordType is the type of DNS Record.
const ( // A Record A RecordType = "A" // AAAA Record AAAA RecordType = "AAAA" // ALIAS Record ALIAS RecordType = "ALIAS" // CAA Record CAA RecordType = "CAA" // CNAME Record CNAME RecordType = "CNAME" // MX Record MX RecordType = "MX" // MXE Record MXE RecordType = "MXE" // NS Record NS RecordType = "NS" // TXT Record TXT RecordType = "TXT" // URL Record URL RecordType = "URL" // URL301 Record URL301 RecordType = "URL301" // FRAME Record FRAME RecordType = "FRAME" )
Click to show internal directories.
Click to hide internal directories.