zone

package
v0.0.0-...-58d3d42 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2018 License: MIT Imports: 5 Imported by: 23

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateStatus

type CreateStatus struct {
	*Status
	// UUID is the created zone ID
	UUID *uuid.UUID `json:"uuid"`
}

CreateStatus holds the data for returned by the API zone creation

type Info

type Info struct {
	// Retry is the amount of time in seconds that a domain's primary name server (or servers)
	// should wait if an attempt to refresh by a secondary name server failed before
	// attempting to refresh a domain's zone with that secondary name server again.
	Retry int `json:"retry,omitempty"`
	// UUID is the zone id
	UUID *uuid.UUID `json:"uuid,omitempty"`
	// Minimum is the amount of time in seconds that a domain's resource records are valid.
	// This is also known as a minimum TTL, and can be overridden by an individual resource record's TTL
	Minimum int `json:"minimum,omitempty"`
	// Refresh is the amount of time in seconds that a secondary name server should wait to check for
	// a new copy of a DNS zone from the domain's primary name server. If a zone file has changed then
	// the secondary DNS server will update it's copy of the zone to match the primary DNS server's zone
	Refresh int `json:"refresh,omitempty"`
	// Expire is the amount of time in seconds that a secondary name server (or servers) will
	// hold a zone before it is no longer considered authoritative
	Expire int64 `json:"expire,omitempty"`
	// SharingID is currently undocumented in http://doc.livedns.gandi.net/
	// But seems to be the ID used to  https://admin.gandi.net/domain/<...>
	SharingID *uuid.UUID `json:"sharing_id,omitempty"`
	// Serial is the revision number of this zone file. Increment this number each time the zone
	// file is changed so that the changes will be distributed to any secondary DNS servers
	Serial int `json:"serial,omitempty"`
	// Email is listed but undocumented in http://doc.livedns.gandi.net/
	Email string `json:"email,omitempty"`
	// PrimaryNS is the name of the nameserver to be used for this zone
	PrimaryNS string `json:"primary_ns,omitempty"`
	// Name is the name of the zone
	Name string `json:"name,omitempty"`
	// DomainsHref contains the API URL to retrieve all domains using this zone
	DomainsHref string `json:"domains_href,omitempty"`
	// ZoneHref contains the API URL to retrieve full DomainInfo for this domain
	ZoneHref string `json:"zone_href,omitempty"`
	// ZoneRecordsHref contains the API URL to retrieve all records registered for the zone linked to this zone
	ZoneRecordsHref string `json:"zone_records_href,omitempty"`
}

Info holds the DNS zone informations

type Status

type Status struct {
	// Message is the status message returned by the gandi api
	Message string `json:"message"`
}

Status holds the data returned by the API in case of zone update or association to a domain

type Zone

type Zone struct {
	*client.Client
}

Zone holds the zone client structure

func New

func New(c *client.Client) *Zone

New instanciates a new instance of a Zone client

func (*Zone) Create

func (z *Zone) Create(zoneInfo Info) (status *CreateStatus, err error)

Create creates a new zone

func (*Zone) Delete

func (z *Zone) Delete(zoneInfo Info) (err error)

Delete Deletes an existing zone

func (*Zone) Domains

func (z *Zone) Domains(zoneInfo Info) (domains []*domain.InfoBase, err error)

Domains lists all domains using a zone

func (*Zone) Info

func (z *Zone) Info(zoneInfo Info) (info *Info, err error)

Info Gets zone information

func (*Zone) InfoByUUID

func (z *Zone) InfoByUUID(uuid uuid.UUID) (info *Info, err error)

InfoByUUID Gets zone information from its UUID

func (*Zone) List

func (z *Zone) List() (zones []*Info, err error)

List accessible DNS zones.

func (*Zone) Records

func (z *Zone) Records(zoneInfo Info) record.Manager

Records gets a record client for the current zone

func (*Zone) Set

func (z *Zone) Set(domainName string, zoneInfo Info) (status *Status, err error)

Set the current zone of a domain

func (*Zone) Update

func (z *Zone) Update(zoneInfo Info) (status *Status, err error)

Update updates an existing zone

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL