dns

package
v0.0.0-...-8420c95 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2016 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const EndPoint = "https://dns.idcfcloud.com"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	EndPoint  string
	APIKey    string
	SecretKey string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(apikey, secretkey string) (*Client, error)

func (*Client) CreateRecord

func (c *Client) CreateRecord(p CreateRecordParameter) (r *Record, err error)

func (*Client) CreateZone

func (c *Client) CreateZone(p CreateZoneParameter) (z *Zone, err error)

func (*Client) DeleteRecord

func (c *Client) DeleteRecord(zoneid, recordid string) (err error)

func (*Client) DeleteZone

func (c *Client) DeleteZone(zoneid string) (err error)

func (*Client) Record

func (c *Client) Record(zoneid, recordid string) (r *Record, err error)

func (*Client) Records

func (c *Client) Records(zoneid string) (rs []*Record, err error)

func (*Client) Request

func (c *Client) Request(method, path string, param map[string]interface{}) ([]byte, error)

func (*Client) UpdateRecord

func (c *Client) UpdateRecord(p UpdateRecordParameter) (r *Record, err error)

func (*Client) UpdateZone

func (c *Client) UpdateZone(p UpdateZoneParameter) (z *Zone, err error)

func (*Client) VerifyZone

func (c *Client) VerifyZone(zoneid string) (err error)

func (*Client) Zone

func (c *Client) Zone(zoneid string) (z *Zone, err error)

func (*Client) Zones

func (c *Client) Zones() (zs []*Zone, err error)

type CreateRecordParameter

type CreateRecordParameter map[string]interface{}

func NewCreateRecordParamter

func NewCreateRecordParamter(
	zoneid, name, recordType, content string) CreateRecordParameter

func (CreateRecordParameter) SetPriority

func (p CreateRecordParameter) SetPriority(priority int)

func (CreateRecordParameter) SetTTL

func (p CreateRecordParameter) SetTTL(ttl int)

type CreateZoneParameter

type CreateZoneParameter map[string]interface{}

func NewCreateZoneParamter

func NewCreateZoneParamter(name, email string) CreateZoneParameter

func (CreateZoneParameter) SetDefaultTTL

func (p CreateZoneParameter) SetDefaultTTL(ttl int)

func (CreateZoneParameter) SetDescription

func (p CreateZoneParameter) SetDescription(description string)

type Record

type Record struct {
	UUID      string
	Name      string
	Type      string
	TTL       int
	Content   interface{}
	Priority  int
	CreatedAt time.Time
	UpdatedAt time.Time
}

func (*Record) UnmarshalJSON

func (r *Record) UnmarshalJSON(data []byte) error

type UpdateRecordParameter

type UpdateRecordParameter map[string]interface{}

func NewUpdateRecordParamter

func NewUpdateRecordParamter(zoneid, recordid string) UpdateRecordParameter

func (UpdateRecordParameter) SetContent

func (p UpdateRecordParameter) SetContent(content interface{})

func (UpdateRecordParameter) SetName

func (p UpdateRecordParameter) SetName(name string)

func (UpdateRecordParameter) SetPriority

func (p UpdateRecordParameter) SetPriority(priority int)

func (UpdateRecordParameter) SetTTL

func (p UpdateRecordParameter) SetTTL(ttl int)

func (UpdateRecordParameter) SetType

func (p UpdateRecordParameter) SetType(recordType string)

type UpdateZoneParameter

type UpdateZoneParameter map[string]interface{}

func NewUpdateZoneParamter

func NewUpdateZoneParamter(zoneid string) UpdateZoneParameter

func (UpdateZoneParameter) SetDefaultTTL

func (p UpdateZoneParameter) SetDefaultTTL(ttl int)

func (UpdateZoneParameter) SetDescription

func (p UpdateZoneParameter) SetDescription(description string)

type Zone

type Zone struct {
	UUID          string
	Name          string
	Description   string
	DefaultTTL    int
	Authenticated bool
	CreatedAt     time.Time
	UpdatedAt     time.Time
}

func (*Zone) UnmarshalJSON

func (z *Zone) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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