Documentation
¶
Index ¶
- type CreateRecordResponse
- type CreateUpdateRecordBody
- type Credentials
- type RecordResponse
- type RecordType
- type SimplyClient
- func (c *SimplyClient) AddRecord(FQDNName string, Value string, recordType RecordType) (int, error)
- func (c *SimplyClient) GetRecord(FQDNName string, RecordData string, recordType RecordType) (int, string, error)
- func (c *SimplyClient) GetRecords(FQDNName string) (string, error)
- func (c *SimplyClient) RemoveRecord(RecordId int, DnsName string) bool
- func (c *SimplyClient) UpdateDDNS(FQDNName string, Ip string) (bool, error)
- func (c *SimplyClient) UpdateRecord(RecordId int, FQDNName string, Value string, recordType RecordType) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateRecordResponse ¶
type CreateRecordResponse struct {
Record struct {
Id int `json:"id"`
} `json:"record"`
Status int `json:"status"`
Message string `json:"message"`
}
CreateRecordResponse api type
type CreateUpdateRecordBody ¶
type CreateUpdateRecordBody struct {
Type RecordType `json:"type"`
Name string `json:"name"`
Data string `json:"data"`
Priority int `json:"priority"`
Ttl int `json:"ttl"`
}
CreateUpdateRecordBody api type
type Credentials ¶
type RecordResponse ¶
type RecordResponse struct {
Records []struct {
RecordId int `json:"record_id"`
Name string `json:"name"`
Ttl int `json:"ttl"`
Data string `json:"data"`
Type string `json:"type"`
Priority int `json:"priority"`
} `json:"records"`
Status int `json:"status"`
Message string `json:"message"`
}
RecordResponse api type
type RecordType ¶ added in v1.0.0
type RecordType string
type SimplyClient ¶
type SimplyClient struct {
Credentials Credentials `json:"credentials"`
Logger *log.Logger
}
SimplyClient base type
func CreateSimplyClient ¶ added in v1.0.0
func CreateSimplyClient(accountName string, apiKey string) SimplyClient
func (*SimplyClient) AddRecord ¶ added in v1.0.0
func (c *SimplyClient) AddRecord(FQDNName string, Value string, recordType RecordType) (int, error)
AddRecord Add record to simply
func (*SimplyClient) GetRecord ¶ added in v1.0.0
func (c *SimplyClient) GetRecord(FQDNName string, RecordData string, recordType RecordType) (int, string, error)
GetRecord Fetch record by FQDNName, RecordData and RecordType,TTL and priority are ignored, returns id of first record found.
func (*SimplyClient) GetRecords ¶ added in v1.0.0
func (c *SimplyClient) GetRecords(FQDNName string) (string, error)
GetRecords Fetch records by FQDNName returns id
func (*SimplyClient) RemoveRecord ¶ added in v1.0.0
func (c *SimplyClient) RemoveRecord(RecordId int, DnsName string) bool
RemoveRecord Remove record from simply
func (*SimplyClient) UpdateDDNS ¶ added in v1.0.1
func (c *SimplyClient) UpdateDDNS(FQDNName string, Ip string) (bool, error)
DDNS update/create record if Ip omited Simply api will use client IP
func (*SimplyClient) UpdateRecord ¶ added in v1.0.0
func (c *SimplyClient) UpdateRecord(RecordId int, FQDNName string, Value string, recordType RecordType) (bool, error)
UpdateRecord Update record by RecordId, FQDNName, Value and RecordType
Click to show internal directories.
Click to hide internal directories.