Documentation ¶
Index ¶
- type Client
- func (c *Client) GetRecords(ctx context.Context, zoneID string, filter *RecordsFilter) ([]Record, error)
- func (c *Client) ListZones(ctx context.Context) ([]Zone, error)
- func (c *Client) RemoveRecord(ctx context.Context, zoneID, recordID string) error
- func (c *Client) ReplaceRecords(ctx context.Context, zoneID string, records []Record) error
- type ClientError
- type CustomerZone
- type Error
- type Record
- type RecordsFilter
- type Zone
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { BaseURL *url.URL HTTPClient *http.Client // contains filtered or unexported fields }
Client Ionos API client.
func (*Client) GetRecords ¶
func (c *Client) GetRecords(ctx context.Context, zoneID string, filter *RecordsFilter) ([]Record, error)
GetRecords gets the records of a zones.
func (*Client) RemoveRecord ¶
RemoveRecord removes a record.
type ClientError ¶
type ClientError struct { StatusCode int // contains filtered or unexported fields }
ClientError a detailed error.
func (ClientError) Error ¶
func (f ClientError) Error() string
func (ClientError) Unwrap ¶
func (f ClientError) Unwrap() error
type CustomerZone ¶
type CustomerZone struct { // The zone id. ID string `json:"id,omitempty"` // The zone name Name string `json:"name,omitempty"` Records []Record `json:"records,omitempty"` // Represents the possible zone types. Type string `json:"type,omitempty"` }
CustomerZone defines model for customer-zone.
type Error ¶
type Error struct { // The error code. Code string `json:"code,omitempty"` // The error message. Message string `json:"message,omitempty"` }
Error defines model for error.
type Record ¶
type Record struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Content string `json:"content,omitempty"` // Time to live for the record, recommended 3600. TTL int `json:"ttl,omitempty"` // Holds supported dns record types. Type string `json:"type,omitempty"` Priority int `json:"prio,omitempty"` // When is true, the record is not visible for lookup. Disabled bool `json:"disabled,omitempty"` }
Record defines model for record.
type RecordsFilter ¶
type RecordsFilter struct { // The FQDN used to filter all the record names that end with it. Suffix string `url:"suffix,omitempty"` // The record names that should be included (same as name field of Record) RecordName string `url:"recordName,omitempty"` // A comma-separated list of record types that should be included RecordType string `url:"recordType,omitempty"` }
Click to show internal directories.
Click to hide internal directories.