Documentation ¶
Index ¶
- type Domain
- type DomainResponse
- type Record
- type RecordsResponse
- type Token
- type VegaDNSClient
- func (vega *VegaDNSClient) CreateTXT(domainID int, fqdn string, value string, ttl int) error
- func (vega *VegaDNSClient) DeleteRecord(recordID int) error
- func (vega *VegaDNSClient) GetAuthZone(fqdn string) (string, int, error)
- func (vega *VegaDNSClient) GetDomainID(domain string) (int, error)
- func (vega *VegaDNSClient) GetRecordID(domainID int, record string, recordType string) (int, error)
- func (vega *VegaDNSClient) Send(method string, endpoint string, params map[string]string) (*http.Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Domain ¶
type Domain struct { Status string `json:"status"` Domain string `json:"domain"` DomainID int `json:"domain_id"` OwnerID int `json:"owner_id"` }
Domain - struct containing a domain object
type DomainResponse ¶
type DomainResponse struct { Status string `json:"status"` Total int `json:"total_domains"` Domains []Domain `json:"domains"` }
DomainResponse - api response of a domain list
type Record ¶
type Record struct { Name string `json:"name"` Value string `json:"value"` RecordType string `json:"record_type"` TTL int `json:"ttl"` RecordID int `json:"record_id"` LocationID string `json:"location_id"` DomainID int `json:"domain_id"` }
Record - struct representing a Record object
type RecordsResponse ¶
type RecordsResponse struct { Status string `json:"status"` Total int `json:"total_records"` Domain Domain `json:"domain"` Records []Record `json:"records"` }
RecordsResponse - api response list of records
type Token ¶
type Token struct { Token string `json:"access_token"` TokenType string `json:"token_type"` ExpiresIn int `json:"expires_in"` ExpiresAt time.Time }
Token - struct to hold token information
type VegaDNSClient ¶
type VegaDNSClient struct { User string Pass string APIKey string APISecret string // contains filtered or unexported fields }
VegaDNSClient - Struct for holding VegaDNSClient specific attributes
func NewVegaDNSClient ¶
func NewVegaDNSClient(url string) VegaDNSClient
NewVegaDNSClient - helper to instantiate a client Input: url string Output: VegaDNSClient
func (*VegaDNSClient) CreateTXT ¶
CreateTXT - Creates a TXT record Input: domainID, fqdn, value, ttl Output: nil or error
func (*VegaDNSClient) DeleteRecord ¶
func (vega *VegaDNSClient) DeleteRecord(recordID int) error
DeleteRecord - deletes a record by id Input: recordID Output: nil or error
func (*VegaDNSClient) GetAuthZone ¶
func (vega *VegaDNSClient) GetAuthZone(fqdn string) (string, int, error)
GetAuthZone retrieves the closest match to a given domain. Example: Given an argument "a.b.c.d.e", and a VegaDNS hosted domain of "c.d.e", GetClosestMatchingDomain will return "c.d.e".
func (*VegaDNSClient) GetDomainID ¶
func (vega *VegaDNSClient) GetDomainID(domain string) (int, error)
GetDomainID - returns the id for a domain Input: domain Output: int, err
func (*VegaDNSClient) GetRecordID ¶
GetRecordID - helper to get the id of a record Input: domainID, record, recordType Output: int