record

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: 2 Imported by: 43

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Record

type Record struct {
	*client.Client
}

func New

func New(c *client.Client) *Record

func (*Record) Add

func (self *Record) Add(args RecordAdd) (*RecordInfo, error)

Add a new record to zone

func (*Record) Count

func (self *Record) Count(zoneId, version int64) (int64, error)

Count number of records for a given zone/version

func (*Record) Delete

func (self *Record) Delete(zoneId, version int64, recordId string) (bool, error)

Remove a record from a zone/version

func (*Record) List

func (self *Record) List(zoneId, version int64) ([]*RecordInfo, error)

List records of a version of a DNS zone

func (*Record) SetRecords

func (self *Record) SetRecords(zone_id, version_id int64, args []RecordSet) ([]*RecordInfo, error)

SetRecords replaces the entire zone with new records.

func (*Record) Update

func (self *Record) Update(args RecordUpdate) ([]*RecordInfo, error)

Update a record from zone/version

type RecordAdd

type RecordAdd struct {
	Zone    int64  `goptions:"-z, --zone, obligatory, description='Zone id'"`
	Version int64  `goptions:"-v, --version, obligatory, description='Zone version'"`
	Name    string `goptions:"-n, --name, obligatory, description='Record name. Relative name, may contain leading wildcard. @ for empty name'"`
	Type    string `goptions:"-t, --type, obligatory, description='Record type'"`
	Value   string `goptions:"-V, --value, obligatory, description='Value for record. Semantics depends on the record type.'"`
	Ttl     int64  `goptions:"-T, --ttl, description='Time to live, in seconds, between 5 minutes and 30 days'"`
}

type RecordInfo

type RecordInfo struct {
	Id    string
	Name  string
	Ttl   int64
	Type  string
	Value string
}

func ToRecordInfo

func ToRecordInfo(res map[string]interface{}) *RecordInfo

type RecordSet

type RecordSet map[string]interface{}

type RecordUpdate

type RecordUpdate struct {
	Zone    int64  `goptions:"-z, --zone, obligatory, description='Zone id'"`
	Version int64  `goptions:"-v, --version, obligatory, description='Zone version'"`
	Name    string `goptions:"-n, --name, obligatory, description='Record name. Relative name, may contain leading wildcard. @ for empty name'"`
	Type    string `goptions:"-t, --type, obligatory, description='Record type'"`
	Value   string `goptions:"-V, --value, obligatory, description='Value for record. Semantics depends on the record type.'"`
	Ttl     int64  `goptions:"-T, --ttl, description='Time to live, in seconds, between 5 minutes and 30 days'"`
	Id      string `goptions:"-r, --record, obligatory, description='Record id'"`
}

Jump to

Keyboard shortcuts

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