Documentation ¶
Overview ¶
Package client contains the methods to query and modify resources in the Hetzner DNS API
Index ¶
- Constants
- type Client
- type RecordClient
- func (c *RecordClient) Create(name string, recordType string, value string, zoneId string) (schema.Record, error)
- func (c *RecordClient) Delete(id string) error
- func (c *RecordClient) GetAll() ([]schema.Record, error)
- func (c *RecordClient) GetById(id string) (schema.Record, error)
- func (c *RecordClient) Update(name string, recordType string, value string, zoneId string, id string) (schema.Record, error)
- type ZoneClient
Constants ¶
const Endpoint = "https://dns.hetzner.com/api/v1/"
Endpoint is the default endpoint for the Hetzner DNS API
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Record *RecordClient Zone *ZoneClient // contains filtered or unexported fields }
Client provides methods to configure the connection to the Hetzner DNS API
func (*Client) WithEndpoint ¶
WithEndpoint configures a Client to use the specified endpoint
type RecordClient ¶
type RecordClient struct {
Client *Client
}
RecordClient provides methods to query and modify records in the Hetzner DNS API
func (*RecordClient) Create ¶
func (c *RecordClient) Create(name string, recordType string, value string, zoneId string) (schema.Record, error)
Create created a new Record in the Hetzner DNS API. Allowed recordTypes are A, AAA, NS, MX, CNAME, RP, TXT, SOA, HINFO, SRV, DANE, TLSA, DS, CAA
func (*RecordClient) Delete ¶
func (c *RecordClient) Delete(id string) error
Delete deletes a record in the Hetzner DNS API
func (*RecordClient) GetAll ¶
func (c *RecordClient) GetAll() ([]schema.Record, error)
GetAll receives all records associated with the user from the Hetzner DNS API
type ZoneClient ¶
type ZoneClient struct {
Client *Client
}
ZoneClient provides methods to query zones in the Hetzner DNS API