Documentation ¶
Index ¶
- type APIRequest
- type APIResponse
- type Client
- func (c *Client) AddRecord(ctx context.Context, zone string, record DNSRow) error
- func (c *Client) Commit(ctx context.Context, zone string) error
- func (c *Client) DeleteRecord(ctx context.Context, zone string, recordID string) error
- func (c *Client) GetRecords(ctx context.Context, zone string) ([]DNSRow, error)
- func (c *Client) Ping(ctx context.Context) error
- type DNSRow
- type DNSRowRequest
- type Response
- type ResponsePayload
- type Rows
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIRequest ¶
type APIResponse ¶
type APIResponse[D any] struct { Response ResponsePayload[D] `json:"response"` }
func (APIResponse[D]) GetCode ¶
func (a APIResponse[D]) GetCode() int
func (APIResponse[D]) GetResult ¶
func (a APIResponse[D]) GetResult() string
type Client ¶
Client the API client for Webos.
func (*Client) AddRecord ¶
AddRecord adds a record in the zone, either by updating existing records or creating new ones. https://kb.wedos.com/en/wapi-api-interface/wapi-command-dns-add-row/ https://kb.wedos.com/en/wapi-api-interface/wapi-command-dns-row-update/
func (*Client) Commit ¶
Commit not really required, all changes will be auto-committed after 5 minutes. https://kb.wedos.com/en/wapi-api-interface/wapi-command-dns-domain-commit/
func (*Client) DeleteRecord ¶
DeleteRecord deletes a record from the zone. If a record does not have an ID, it will be looked up. https://kb.wedos.com/en/wapi-api-interface/wapi-command-dns-row-delete/
func (*Client) GetRecords ¶
GetRecords lists all the records in the zone. https://kb.wedos.com/en/wapi-api-interface/wapi-command-dns-rows-list/