Documentation ¶
Index ¶
- type APIResponse
- type Client
- func (c Client) AddRecord(ctx context.Context, serial uint32, domain string, record shared.Record) (*shared.ZoneSerial, error)
- func (c Client) DeleteRecord(ctx context.Context, serial uint32, domain string, lineIndex int) (*shared.ZoneSerial, error)
- func (c Client) EditRecord(ctx context.Context, serial uint32, domain string, record shared.Record) (*shared.ZoneSerial, error)
- func (c Client) FetchZoneInformation(ctx context.Context, domain string) ([]shared.ZoneRecord, error)
- type Metadata
- type ZoneData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIResponse ¶
type Client ¶
func (Client) AddRecord ¶
func (c Client) AddRecord(ctx context.Context, serial uint32, domain string, record shared.Record) (*shared.ZoneSerial, error)
AddRecord adds a new record.
add='{"dname":"example", "ttl":14400, "record_type":"TXT", "data":["string1", "string2"]}'
func (Client) DeleteRecord ¶
func (c Client) DeleteRecord(ctx context.Context, serial uint32, domain string, lineIndex int) (*shared.ZoneSerial, error)
DeleteRecord deletes an existing record.
remove=22
func (Client) EditRecord ¶
func (c Client) EditRecord(ctx context.Context, serial uint32, domain string, record shared.Record) (*shared.ZoneSerial, error)
EditRecord edits an existing record.
edit='{"line_index": 9, "dname":"example", "ttl":14400, "record_type":"TXT", "data":["string1", "string2"]}'
func (Client) FetchZoneInformation ¶
func (c Client) FetchZoneInformation(ctx context.Context, domain string) ([]shared.ZoneRecord, error)
FetchZoneInformation fetches zone information. https://api.docs.cpanel.net/openapi/whm/operation/parse_dns_zone/
type ZoneData ¶
type ZoneData struct {
Payload []shared.ZoneRecord `json:"payload,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.