Documentation
¶
Index ¶
- type Client
- func (c *Client) CreateRecord(ctx context.Context, zone string, r Record) (Record, error)
- func (c *Client) DeleteRecord(ctx context.Context, id string) error
- func (c *Client) GetAllRecords(ctx context.Context, zone string) ([]Record, error)
- func (c *Client) GetZoneID(ctx context.Context, zone string) (string, error)
- func (c *Client) UpdateRecord(ctx context.Context, zone string, r Record) (Record, error)
- type Provider
- func (p *Provider) AppendRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
- func (p *Provider) DeleteRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
- func (p *Provider) GetRecords(ctx context.Context, zone string) ([]libdns.Record, error)
- func (p *Provider) SetRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
- type Record
- type Zone
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶ added in v1.0.0
type Client struct {
// contains filtered or unexported fields
}
Client is a Hetzner DNS API client.
func (*Client) CreateRecord ¶ added in v1.0.0
CreateRecord creates a record for the given zone.
func (*Client) DeleteRecord ¶ added in v1.0.0
DeleteRecord deletes a record for the given ID and zone.
func (*Client) GetAllRecords ¶ added in v1.0.0
GetAllRecords returns all records for the given zone.
type Provider ¶
type Provider struct { // AuthAPIToken is the Hetzner Auth API token - see https://dns.hetzner.com/api-docs#section/Authentication/Auth-API-Token AuthAPIToken string `json:"auth_api_token"` // contains filtered or unexported fields }
Provider implements the libdns interfaces for Hetzner.
func (*Provider) AppendRecords ¶
func (p *Provider) AppendRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
AppendRecords implements the libdns.RecordAppender interface.
func (*Provider) DeleteRecords ¶
func (p *Provider) DeleteRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
DeleteRecords implements the libdns.RecordDeleter interface.
func (*Provider) GetRecords ¶
GetRecords implements the libdns.RecordGetter interface.
type Record ¶ added in v1.0.0
type Record struct { ID string `json:"id,omitempty"` ZoneID string `json:"zone_id,omitempty"` Type string `json:"type"` Name string `json:"name"` Value string `json:"value"` TTL int `json:"ttl"` }
Record is the record type for Hetzner implementing the libdns.Record interface.
Click to show internal directories.
Click to hide internal directories.