Documentation ¶
Index ¶
- Constants
- Variables
- func FormatTime(time time.Time) string
- func Time(value string) (time.Time, error)
- func TimeInLocation(value string, location *time.Location) (time.Time, error)
- type AllowTransferFrom
- type Auth
- type Callback
- type Changed
- type Client
- type Code
- type Comment
- type Created
- type Data
- type Default
- type Domainsafe
- type Free
- type Main
- type Message
- type NameServer
- type NsAction
- type NsGroup
- type Owner
- type PurgeType
- type RRType
- type Request
- type ResourceRecord
- type Response
- type Soa
- type Status
- type SystemNameServer
- type Task
- type TaskKey
- type User
- type WwwInclude
- type Zone
Constants ¶
View Source
const ( STATUS_S string = "Success" STATUS_E string = "Error" STATUS_N string = "Notification" STATUS_EF string = "Error Function" ZONE_CREATE string = "ZONE_CREATE" ZONE_UPDATE string = "ZONE_UPDATE" ZONE_UPDATE_BULK string = "ZONE_UPDATE_BULK" ZONE_INFO string = "ZONE_INFO" ZONE_COMMENT_UPDATE string = "ZONE_COMMENT_UPDATE" )
View Source
const ( A = RRType("A") AAAA = RRType("AAAA") MX = RRType("MX") CNAME = RRType("CNAME") NS = RRType("NS") PTR = RRType("PTR") TXT = RRType("TXT") HINFO = RRType("HINFO") SPF = RRType("SPF") SRV = RRType("SRV") NAPTR = RRType("NAPTR") )
View Source
const (
DDMMYYYYhhmmss = "2006-01-02 15:04:05"
)
View Source
const DEFAULT_URL = "https://gateway.autodns.com"
Variables ¶
View Source
var REQUIRED_ENV = []string{"AUTODNS_USER", "AUTODNS_PASSWORD", "AUTODNS_CONTEXT"}
View Source
var TASK_CODES = map[string]Code{ ZONE_CREATE: {Number: "0201"}, ZONE_UPDATE: {Number: "0202"}, ZONE_UPDATE_BULK: {Number: "0202001"}, ZONE_INFO: {Number: "0205"}, ZONE_COMMENT_UPDATE: {Number: "0202004"}, }
Functions ¶
func FormatTime ¶
Types ¶
type AllowTransferFrom ¶
type AllowTransferFrom string
type Client ¶
type Client struct { Url string Context string SystemNs []SystemNameServer User string // contains filtered or unexported fields }
func NewClient ¶
func NewClient(user, password, context string, url string, sysNS []SystemNameServer) (*Client, error)
func NewClientFromEnv ¶
func NewLangClient ¶ added in v0.0.2
func NewLangClient(user, password, lang, context string, url string, sysNS []SystemNameServer) (*Client, error)
func (*Client) NewRequest ¶ added in v0.0.2
func (*Client) PerformRequest ¶
type Default ¶
type Default struct { Chardata string `xml:",chardata"` Comment *Comment `xml:"comment"` ResourceRecordAdds []*ResourceRecord `xml:"rr_add"` ResourceRecordRemoves []*ResourceRecord `xml:"rr_rem"` }
func NewTaskDefault ¶
func NewTaskDefault() *Default
func (*Default) AddRecordAdd ¶
func (d *Default) AddRecordAdd(rr *ResourceRecord) *Default
func (*Default) AddRecordRem ¶
func (d *Default) AddRecordRem(rr *ResourceRecord) *Default
func (*Default) RemRecordAdd ¶
func (d *Default) RemRecordAdd(rr *ResourceRecord) *Default
func (*Default) RemRecordRem ¶
func (d *Default) RemRecordRem(rr *ResourceRecord) *Default
type Domainsafe ¶
type Domainsafe string
type NameServer ¶
type Request ¶
type Request struct { XMLName xml.Name `xml:"request"` Chardata string `xml:",chardata"` Auth *Auth Owner *Owner Language string `xml:"language"` Task *Task }
func ParseRequest ¶
type ResourceRecord ¶
type ResourceRecord struct { Chardata string `xml:",chardata"` Name string `xml:"name"` Ttl string `xml:"ttl"` Type *RRType `xml:"type"` Pref string `xml:"pref,omitempty"` Value string `xml:"value"` }
func NewResourceRecord ¶
func NewResourceRecord(params map[string]string) (*ResourceRecord, error)
func (*ResourceRecord) Hash ¶
func (rr *ResourceRecord) Hash() string
type SystemNameServer ¶
type SystemNameServer string
type Task ¶
type Task struct { XMLName xml.Name `xml:"task"` Chardata string `xml:",chardata"` Code Code `xml:"code"` Default *Default `xml:"default"` Key *TaskKey `xml:"key,omitempty"` Zone *Zone `xml:"zone"` }
func NewTaskWithCode ¶
func NewTaskWithKey ¶
func (*Task) WithDefault ¶
type WwwInclude ¶
type WwwInclude string
type Zone ¶
type Zone struct { Chardata string `xml:",chardata"` Name string `xml:"name"` Changed *Changed `xml:"changed"` Created *Created `xml:"created"` SystemNs *SystemNameServer `xml:"system_ns"` NsAction *NsAction `xml:"ns_action"` WwwInclude *WwwInclude `xml:"www_include"` AllowTransferFrom *AllowTransferFrom `xml:"allow_transfer_from"` Main *Main `xml:"main"` Soa *Soa `xml:"soa"` NameServers []*NameServer `xml:"nserver"` ResourceRecords []*ResourceRecord `xml:"rr"` Free []*Free `xml:"free"` Domainsafe *Domainsafe `xml:"domainsafe"` Owner *User `xml:"owner"` UpdatedBy *User `xml:"updated_by"` NsGroup *NsGroup `xml:"ns_group"` PurgeType *PurgeType `xml:"purge_type"` }
func (*Zone) WithSystemNS ¶
func (zone *Zone) WithSystemNS(sysNameServer SystemNameServer) *Zone
Click to show internal directories.
Click to hide internal directories.