Documentation
¶
Overview ¶
Package neoserv implements a DNS record management client compatible with the libdns interfaces for Neoserv.
Index ¶
- Constants
- Variables
- 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)
Constants ¶
View Source
const ( TTL1m = 1 * time.Minute TTL5m = 5 * time.Minute TTL15m = 15 * time.Minute TTL30m = 30 * time.Minute TTL1h = 1 * time.Hour TTL6h = 6 * time.Hour TTL12h = 12 * time.Hour TTL24h = 24 * time.Hour TTL2d = 2 * 24 * time.Hour TTL7d = 7 * 24 * time.Hour TTL14d = 14 * 24 * time.Hour TTL30d = 30 * 24 * time.Hour )
Neoserv API does not support all TTL values. The following are the supported TTL values. Check Provider.UnsupportedTTLisError to determine how unsupported TTL values are handled.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// Email used to authenticate with moj.neoserv.si
Username string `json:"username,omitempty"`
// Password used to authenticate with moj.neoserv.si
Password string `json:"password,omitempty"`
// UnsupportedTTLisError determines whether an unsupported TTL value should be treated as an error.
// If set to true, the provider will return an error if an unsupported TTL value is requested.
// If set to false, the provider will set the TTL to the nearest supported value that is at least the requested
// value.
UnsupportedTTLisError bool `json:"unsupported_ttl_is_error,omitempty"`
// contains filtered or unexported fields
}
Provider facilitates DNS record manipulation with Neoserv.si.
func (*Provider) AppendRecords ¶
func (p *Provider) AppendRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
AppendRecords adds records to the zone. It returns the records that were added.
func (*Provider) DeleteRecords ¶
func (p *Provider) DeleteRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)
DeleteRecords deletes the records from the zone. It returns the records that were deleted.
func (*Provider) GetRecords ¶
GetRecords lists all the records in the zone.
Click to show internal directories.
Click to hide internal directories.