Documentation
¶
Index ¶
- func Bool(v bool) *bool
- func BoolValue(v *bool) bool
- func String(v string) *string
- func StringValue(v *string) string
- func Uint32(v uint32) *uint32
- func Uint32Value(v *uint32) uint32
- func Uint64(v uint64) *uint64
- func Uint64Value(v *uint64) uint64
- type Client
- type Comment
- type Cryptokey
- type CryptokeysService
- type Error
- type Export
- type NotifyResult
- type RRset
- type RRsets
- type Record
- type RecordsService
- func (r *RecordsService) Add(domain string, name string, recordType string, ttl uint32, content []string) error
- func (r *RecordsService) Change(domain string, name string, recordType string, ttl uint32, content []string) error
- func (r *RecordsService) Delete(domain string, name string, recordType string) error
- type Server
- type ServersService
- type Statistic
- type StatisticsService
- type Zone
- type ZoneKind
- type ZoneType
- type ZonesService
- func (z *ZonesService) AddMaster(domain string, dnssec bool, nsec3Param string, nsec3Narrow bool, ...) (*Zone, error)
- func (z *ZonesService) AddNative(domain string, dnssec bool, nsec3Param string, nsec3Narrow bool, ...) (*Zone, error)
- func (z *ZonesService) AddSlave(domain string, masters []string) (*Zone, error)
- func (z *ZonesService) Change(domain string, zone *Zone) error
- func (z *ZonesService) Delete(domain string) error
- func (z *ZonesService) Export(domain string) (Export, error)
- func (z *ZonesService) Get(domain string) (*Zone, error)
- func (z *ZonesService) List() ([]Zone, error)
- func (z *ZonesService) Notify(domain string) (*NotifyResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bool ¶
Bool is a helper function that allocates a new bool value to store v and returns a pointer to it.
func String ¶
String is a helper function that allocates a new string value to store v and returns a pointer to it.
func StringValue ¶
StringValue is a helper function that returns the value of a bool pointer or "".
func Uint32 ¶
Uint32 is a helper function that allocates a new uint32 value to store v and returns a pointer to it.
func Uint32Value ¶
Uint32Value is a helper function that returns the value of a bool pointer or 0.
func Uint64 ¶
Uint64 is a helper function that allocates a new uint64 value to store v and returns a pointer to it.
func Uint64Value ¶
Uint64Value is a helper function that returns the value of a bool pointer or 0.
Types ¶
type Client ¶
type Client struct {
Scheme string
Hostname string
Port string
VHost string
Headers map[string]string
Cryptokeys *CryptokeysService
Records *RecordsService
Servers *ServersService
Statistics *StatisticsService
Zones *ZonesService
// contains filtered or unexported fields
}
Client configuration structure
type Comment ¶
type Comment struct {
Content *string `json:"content,omitempty"`
Account *string `json:"account,omitempty"`
ModifiedAt *uint64 `json:"modified_at,omitempty"`
}
Comment structure with JSON API metadata
type Cryptokey ¶
type Cryptokey struct {
Type *string `json:"type,omitempty"`
ID *uint64 `json:"id,omitempty"`
KeyType *string `json:"keytype,omitempty"`
Active *bool `json:"active,omitempty"`
DNSkey *string `json:"dnskey,omitempty"`
DS []string `json:"ds,omitempty"`
Privatekey *string `json:"privatekey,omitempty"`
Algorithm *string `json:"algorithm,omitempty"`
Bits *uint64 `json:"bits,omitempty"`
}
Cryptokey structure with JSON API metadata
type CryptokeysService ¶
type CryptokeysService service
CryptokeysService handles communication with the cryptokeys related methods of the Client API
func (*CryptokeysService) Delete ¶
func (c *CryptokeysService) Delete(domain string, id uint64) error
Delete removes a given Cryptokey
type NotifyResult ¶
type NotifyResult struct {
Result *string `json:"result,omitempty"`
}
NotifyResult structure with JSON API metadata
type RRset ¶
type RRset struct {
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
TTL *uint32 `json:"ttl,omitempty"`
ChangeType *string `json:"changetype,omitempty"`
Records []Record `json:"records,omitempty"`
Comments []Comment `json:"comments,omitempty"`
}
RRset structure with JSON API metadata
type RRsets ¶
type RRsets struct {
Sets []RRset `json:"rrsets,omitempty"`
}
RRsets structure with JSON API metadata
type Record ¶
type Record struct {
Content *string `json:"content,omitempty"`
Disabled *bool `json:"disabled,omitempty"`
SetPTR *bool `json:"set-ptr,omitempty"`
}
Record structure with JSON API metadata
type RecordsService ¶
type RecordsService service
RecordsService handles communication with the records related methods of the Client API
func (*RecordsService) Add ¶
func (r *RecordsService) Add(domain string, name string, recordType string, ttl uint32, content []string) error
Add creates a new resource record
type Server ¶
type Server struct {
Type *string `json:"type,omitempty"`
ID *string `json:"id,omitempty"`
DaemonType *string `json:"daemon_type,omitempty"`
Version *string `json:"version,omitempty"`
URL *string `json:"url,omitempty"`
ConfigURL *string `json:"config_url,omitempty"`
ZonesURL *string `json:"zones_url,omitempty"`
}
Server structure with JSON API metadata
type ServersService ¶
type ServersService service
ServersService handles communication with the servers related methods of the Client API
func (*ServersService) Get ¶
func (s *ServersService) Get(vHost string) (*Server, error)
Get returns a certain Server
func (*ServersService) List ¶
func (s *ServersService) List() ([]Server, error)
List retrieves a list of Servers
type Statistic ¶
type Statistic struct {
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
Value *string `json:"value,omitempty"`
}
Statistic structure with JSON API metadata
type StatisticsService ¶
type StatisticsService service
StatisticsService handles communication with the statistics related methods of the Client API
func (*StatisticsService) List ¶
func (s *StatisticsService) List() ([]Statistic, error)
List retrieves a list of Statistics
type Zone ¶
type Zone struct {
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Type *ZoneType `json:"type,omitempty"`
URL *string `json:"url,omitempty"`
Kind *ZoneKind `json:"kind,omitempty"`
RRsets []RRset `json:"rrsets,omitempty"`
Serial *uint32 `json:"serial,omitempty"`
NotifiedSerial *uint32 `json:"notified_serial,omitempty"`
Masters []string `json:"masters,omitempty"`
DNSsec *bool `json:"dnssec,omitempty"`
Nsec3Param *string `json:"nsec3param,omitempty"`
Nsec3Narrow *bool `json:"nsec3narrow,omitempty"`
Presigned *bool `json:"presigned,omitempty"`
SOAEdit *string `json:"soa_edit,omitempty"`
SOAEditAPI *string `json:"soa_edit_api,omitempty"`
APIRectify *bool `json:"api_rectify,omitempty"`
Zone *string `json:"zone,omitempty"`
Account *string `json:"account,omitempty"`
Nameservers []string `json:"nameservers,omitempty"`
MasterTSIGKeyIDs []string `json:"master_tsig_key_ids,omitempty"`
SlaveTSIGKeyIDs []string `json:"slave_tsig_key_ids,omitempty"`
}
Zone structure with JSON API metadata
type ZoneKind ¶
type ZoneKind string
ZoneKind string type
func ZoneKindPtr ¶
ZoneKindPtr is a helper function that allocates a new ZoneKind value to store v and returns a pointer to it.
type ZoneType ¶
type ZoneType string
ZoneType string type
const ZoneZoneType ZoneType = "Zone"
ZoneZoneType sets the zone's type to zone
func ZoneTypePtr ¶
ZoneTypePtr is a helper function that allocates a new ZoneType value to store v and returns a pointer to it.
type ZonesService ¶
type ZonesService service
ZonesService handles communication with the zones related methods of the Client API
func (*ZonesService) AddMaster ¶
func (z *ZonesService) AddMaster(domain string, dnssec bool, nsec3Param string, nsec3Narrow bool, soaEdit, soaEditApi string, apiRectify bool, nameservers []string) (*Zone, error)
AddMaster creates a new master zone
func (*ZonesService) AddNative ¶
func (z *ZonesService) AddNative(domain string, dnssec bool, nsec3Param string, nsec3Narrow bool, soaEdit, soaEditApi string, apiRectify bool, nameservers []string) (*Zone, error)
AddNative creates a new native zone
func (*ZonesService) AddSlave ¶
func (z *ZonesService) AddSlave(domain string, masters []string) (*Zone, error)
AddSlave creates a new slave zone
func (*ZonesService) Change ¶
func (z *ZonesService) Change(domain string, zone *Zone) error
Change modifies an existing zone
func (*ZonesService) Delete ¶
func (z *ZonesService) Delete(domain string) error
Delete removes a certain Zone for a given domain
func (*ZonesService) Export ¶
func (z *ZonesService) Export(domain string) (Export, error)
Export returns a BIND-like Zone file
func (*ZonesService) Get ¶
func (z *ZonesService) Get(domain string) (*Zone, error)
Get returns a certain Zone for a given domain
func (*ZonesService) List ¶
func (z *ZonesService) List() ([]Zone, error)
List retrieves a list of Zones
func (*ZonesService) Notify ¶
func (z *ZonesService) Notify(domain string) (*NotifyResult, error)
Notify sends a DNS notify packet to all slaves