Documentation ¶
Overview ¶
Package metaname provides a client for the Metaname API.
Index ¶
- type MetanameClient
- func (c *MetanameClient) ConfigureZone(ctx context.Context, zoneName string, records []ResourceRecord, ...) error
- func (c *MetanameClient) CreateDnsRecord(ctx context.Context, domainName string, record ResourceRecord) (string, error)
- func (c *MetanameClient) DeleteDnsRecord(ctx context.Context, domainName string, reference string) error
- func (c *MetanameClient) DnsZone(ctx context.Context, domainName string) ([]ResourceRecord, error)
- func (c *MetanameClient) UpdateDnsRecord(ctx context.Context, domainName string, reference string, ...) error
- type ResourceRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetanameClient ¶
type MetanameClient struct { RpcClient iJsonRpc2Client Host string AccountReference string APIKey string }
A client for the Metaname API.
func NewMetanameClient ¶
func NewMetanameClient(accountReference string, apiKey string) *MetanameClient
Create a new MetanameClient with some default values.
func (*MetanameClient) ConfigureZone ¶
func (c *MetanameClient) ConfigureZone(ctx context.Context, zoneName string, records []ResourceRecord, options interface{}) error
Create or update a zone.
func (*MetanameClient) CreateDnsRecord ¶
func (c *MetanameClient) CreateDnsRecord(ctx context.Context, domainName string, record ResourceRecord) (string, error)
Creates a DNS record in the zone for the given domain and returns a reference that can be used for updating and deleting it.
func (*MetanameClient) DeleteDnsRecord ¶
func (c *MetanameClient) DeleteDnsRecord(ctx context.Context, domainName string, reference string) error
Delete a DNS record from a zone.
func (*MetanameClient) DnsZone ¶
func (c *MetanameClient) DnsZone(ctx context.Context, domainName string) ([]ResourceRecord, error)
Retrieve all the DNS records in a zone.
func (*MetanameClient) UpdateDnsRecord ¶
func (c *MetanameClient) UpdateDnsRecord(ctx context.Context, domainName string, reference string, record ResourceRecord) error
Updates the details of a DNS record in a zone.
type ResourceRecord ¶
type ResourceRecord struct { Name string `json:"name"` Type string `json:"type"` Aux *int `json:"aux"` Ttl int `json:"ttl"` Data string `json:"data"` Reference *string `json:"reference,omitempty"` }
A ResourceRecord is a representation of a DNS record.
Aux should be nil for records other than MX and SRV records, where it represents the priority. Reference should be nil when supplying a ResourceRecord, but will be populated when retrieving a record.