Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client implements a very simple wrapper around the Domeneshop API. For now, it will only deal with adding and removing TXT records, as required by ACME providers. https://api.domeneshop.no/docs/
func (*Client) CreateTXTRecord ¶
func (c *Client) CreateTXTRecord(ctx context.Context, domain *Domain, host string, data string) error
CreateTXTRecord creates a TXT record with the provided host (subdomain) and data. https://api.domeneshop.no/docs/#tag/dns/paths/~1domains~1{domainId}~1dns/post
func (*Client) DeleteTXTRecord ¶
func (c *Client) DeleteTXTRecord(ctx context.Context, domain *Domain, host string, data string) error
DeleteTXTRecord deletes the DNS record matching the provided host and data. https://api.domeneshop.no/docs/#tag/dns/paths/~1domains~1{domainId}~1dns~1{recordId}/delete
func (*Client) GetDomainByName ¶
GetDomainByName fetches the domain list and returns the Domain object for the matching domain. https://api.domeneshop.no/docs/#operation/getDomains
type DNSRecord ¶
type DNSRecord struct { Data string `json:"data"` Host string `json:"host"` ID int `json:"id"` TTL int `json:"ttl"` Type string `json:"type"` }
DNSRecord JSON data structure.
type Domain ¶
type Domain struct { Name string `json:"domain"` ID int `json:"id"` ExpiryDate string `json:"expiry_date"` Nameservers []string `json:"nameservers"` RegisteredDate string `json:"registered_date"` Registrant string `json:"registrant"` Renew bool `json:"renew"` Services Service `json:"services"` Status string }
Domain JSON data structure.