Documentation ¶
Index ¶
- type Client
- func (client *Client) APIRequest(endpoint, params, reqtype string) (response []byte, err error)
- func (client *Client) CreateDomainRecord(domainID int, record ConstellixRecord) error
- func (client *Client) CreateDomains(domains []string) error
- func (client *Client) DeleteDomain(id int) error
- func (client *Client) DeleteDomainRecord(domainID int, recordType string, recordID int) error
- func (client *Client) GetAllDomains() ([]ConstellixDomain, error)
- func (client *Client) GetDomainByName(name string) (ConstellixDomain, error)
- func (client *Client) GetDomainRecord(domainID int, recordType string, recordID int) (ConstellixRecord, error)
- func (client *Client) GetDomainRecords(domainid int) ([]ConstellixRecord, error)
- func (client *Client) GetRecordsByDomainName(domainName string) ([]ConstellixRecord, error)
- func (client *Client) ListDomains() ([]string, error)
- func (client *Client) ModifyDomain(domain ConstellixDomain) error
- func (client *Client) ModifyDomainRecord(domainID int, record ConstellixRecord) error
- type ConstellixDomain
- type ConstellixRecord
- type ConstellixSoa
- type GeolocationObj
- type RecordFailoverObj
- type RecordFailoverValues
- type RoundRobinFailoverObj
- type RoundRobinFailoverObjValues
- type RoundRobinObj
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client Client for the Constellix API
func (*Client) APIRequest ¶
APIRequest make an API request
func (*Client) CreateDomainRecord ¶
func (client *Client) CreateDomainRecord(domainID int, record ConstellixRecord) error
CreateDomainRecord add a record to a domain
func (*Client) CreateDomains ¶
CreateDomains Create a list of domains by name
func (*Client) DeleteDomain ¶
DeleteDomain delete domain, by integer id
func (*Client) DeleteDomainRecord ¶
DeleteDomainRecord delete one domain record
func (*Client) GetAllDomains ¶
func (client *Client) GetAllDomains() ([]ConstellixDomain, error)
GetAllDomains get all domains on the acct
func (*Client) GetDomainByName ¶
func (client *Client) GetDomainByName(name string) (ConstellixDomain, error)
GetDomainByName Get a single domain, by name
func (*Client) GetDomainRecord ¶
func (client *Client) GetDomainRecord(domainID int, recordType string, recordID int) (ConstellixRecord, error)
GetDomainRecord Get one record from a domain, by ID
func (*Client) GetDomainRecords ¶
func (client *Client) GetDomainRecords(domainid int) ([]ConstellixRecord, error)
GetDomainRecords get all records for one domain by domain ID
func (*Client) GetRecordsByDomainName ¶
func (client *Client) GetRecordsByDomainName(domainName string) ([]ConstellixRecord, error)
GetRecordsByDomainName get all records for a domain, by name
func (*Client) ListDomains ¶
ListDomains get a bare list of all domain names
func (*Client) ModifyDomain ¶
func (client *Client) ModifyDomain(domain ConstellixDomain) error
ModifyDomain replace existing Domain
func (*Client) ModifyDomainRecord ¶
func (client *Client) ModifyDomainRecord(domainID int, record ConstellixRecord) error
ModifyDomainRecord add a record to a domain
type ConstellixDomain ¶
type ConstellixDomain struct { ID int `json:"id,omitempty"` Name string `json:"name"` TypeID int `json:"typeId,omitempty"` HasGtdRegions bool `json:"hasGtdRegions,omitempty"` HasGeoIP bool `json:"hasGeoIP,omitempty"` NameserverGroup int `json:"nameserverGroup,omitempty"` Nameservers []string `json:"nameservers,omitempty"` CreatedTs string `json:"createdTs,omitempty"` ModifiedTs string `json:"modifiedTs,omitempty"` Note string `json:"note,omitempty"` Version int `json:"version,omitempty"` Status string `json:"status,omitempty"` Tags []string `json:"tags,omitempty"` Soa *ConstellixSoa `json:"soa,omitempty"` }
ConstellixDomain holds a domain
type ConstellixRecord ¶
type ConstellixRecord struct { ID int `json:"id,omitempty"` Name string `json:"name,omitempty"` TTL int `json:"ttl,omitempty"` Geolocation *GeolocationObj `json:"geolocation,omitempty"` RecordOption string `json:"recordOption,omitempty"` NoAnswer bool `json:"noAnswer,omitempty"` Note string `json:"note,omitempty"` GtdRegion int `json:"gtdRegion,omitempty"` Type string `json:"type,omitempty"` ParentID int `json:"parentId,omitempty"` Parent string `json:"parent,omitempty"` Source string `json:"source,omitempty"` ContactIDs []int `json:"contactIds,omitempty"` RoundRobin []RoundRobinObj `json:"roundRobin"` RecordFailover *RecordFailoverObj `json:"recordFailover,omitifempty"` Pools []int `json:"pools,omitempty"` RoundRobinFailover *RoundRobinFailoverObj `json:"roundRobinFailover"` ModifiedTs int `json:"modifiedTs,omitempty"` Value []string `json:"value,omitempty"` }
ConstellixRecord domain record
type ConstellixSoa ¶
type ConstellixSoa struct { PrimaryNameserver string `json:"primaryNameserver,omitempty"` Email string `json:"email,omitempty"` TTL int `json:"ttl,omitempty"` Serial int `json:"serial,omitempty"` Refresh int `json:"refresh,omitempty"` Retry int `json:"retry,omitempty"` Expire int `json:"expire,omitempty"` NegCache int `json:"negCache,omitempty"` }
ConstellixSoa holds SOA records
type GeolocationObj ¶
type GeolocationObj struct { GeoipUserRegion []int `json:"geoipUserRegion,omitempty"` Drop bool `json:"drop,omitifempty"` }
GeolocationObj geolocation info
type RecordFailoverObj ¶
type RecordFailoverObj struct { FailoverType int `json:"failoverType"` Values []RecordFailoverValues `json:"values"` DisableFlag bool `json:"disableFlag"` }
RecordFailoverObj Failover info
type RecordFailoverValues ¶
type RecordFailoverValues struct { Value string `json:"value"` CheckID string `json:"checkId"` DisableFlag string `json:"disableFlag"` }
RecordFailoverValues Failover values
type RoundRobinFailoverObj ¶
type RoundRobinFailoverObj struct { Values []RoundRobinFailoverObjValues `json:"values"` DisableFlag bool `json:"disableFlag"` }
RoundRobinFailoverObj RR Failover Info
type RoundRobinFailoverObjValues ¶
type RoundRobinFailoverObjValues struct { Value string `json:"value"` DisableFlag bool `json:"disableFlag"` CheckID int `json:"checkId"` }
RoundRobinFailoverObjValues RR Failover values
type RoundRobinObj ¶
type RoundRobinObj struct { Value string `json:"value"` Level string `json:"level,omitifempty"` // for MX records DisableFlag bool `json:"disableFlag"` }
RoundRobinObj holds RoundRobin records from a domain