Documentation ¶
Overview ¶
Package zone implements API functions residing under /zone. This path contains methods for managing IPs.
Package zone implements API functions residing under /zone. This path contains methods for querying and setting the DNS zones and records.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrEmptyRecordNameNotSupported is returned for Create requests when the record has no name set. // Instead "@" must be used to target the domain root. ErrEmptyRecordNameNotSupported = errors.New("empty record name not supported - use \"@\" instead") )
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface { List(ctx context.Context) ([]Zone, error) Get(ctx context.Context, name string) (Zone, error) Create(ctx context.Context, create Definition) (Zone, error) Update(ctx context.Context, name string, update Definition) (Zone, error) Delete(ctx context.Context, name string) error Apply(ctx context.Context, name string, changeset ChangeSet) ([]Record, error) Import(ctx context.Context, name string, zoneData Import) (Revision, error) ListRecords(ctx context.Context, name string) ([]Record, error) NewRecord(ctx context.Context, zone string, record RecordRequest) (Zone, error) UpdateRecord(ctx context.Context, zone string, id uuid.UUID, record RecordRequest) (Zone, error) DeleteRecord(ctx context.Context, zone string, id uuid.UUID) error }
API contains methods for zone and record management
type ChangeSet ¶
type ChangeSet struct { Create []ResourceRecord `json:"create"` Delete []ResourceRecord `json:"delete"` }
type Definition ¶
type Definition struct { // Zone name Name string `json:"name,omitempty"` // Required - Zone name parameter // Parameter used for create/update/delete etc. ZoneName string `json:"zoneName"` // Required - Is master flag // Flag designating if CloudDNS operates as master or slave. IsMaster bool `json:"master"` // Required - DNSSEC mode // DNSSEC mode (master-only) ["managed" or "unvalidated"]. DNSSecMode string `json:"dnssec_mode"` // Required - Admin email address // Admin email address used in SOA record. AdminEmail string `json:"admin_email"` // Required - Refresh value // Refresh value used in SOA record. Refresh int `json:"refresh"` // Required - Retry value //Retry value used in SOA record. Retry int `json:"retry"` // Required - Expire value // Expire value used in SOA record. Expire int `json:"expire"` // Required - Time to live // Default TTL for NS records. TTL int `json:"ttl"` // Master Name Server MasterNS string `json:"master_ns,omitempty"` // IP addresses allowed to initiate domain transfer (DNS NOTIFY). NotifyAllowedIPs []string `json:"notify_allowed_ips,omitempty"` // Configured DNS servers (empty means default servers). DNSServers []DNSServer `json:"dns_servers,omitempty"` }
type RecordRequest ¶
type ResourceRecord ¶
type Zone ¶
type Zone struct { *Definition Customer string `json:"customer"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` PublishedAt time.Time `json:"published_at"` IsEditable bool `json:"is_editable"` ValidationLevel int `json:"validation_level"` DeploymentLevel int `json:"deployment_level"` Revisions []Revision `json:"revisions"` }
Click to show internal directories.
Click to hide internal directories.