Documentation ¶
Index ¶
- Constants
- func PopTXTRecordByValue(r Records, txtData string) int
- func PushTXTRecord(r Records, txtData string) error
- type ApiClient
- type BegetApiMock
- func (b *BegetApiMock) DnsChangeRecords(w http.ResponseWriter, req *http.Request)
- func (b *BegetApiMock) DnsGetData(w http.ResponseWriter, req *http.Request)
- func (b *BegetApiMock) Run(addr string) error
- func (b *BegetApiMock) RunDns(port string)
- func (b *BegetApiMock) Stop(ctx context.Context) error
- func (b *BegetApiMock) StopDns(_ context.Context) error
- type ChangeRecordsRequest
- type ChangeRecordsResponse
- type Credentials
- type GetDataRequest
- type GetDataResponse
- type GetDataResult
- type Records
Constants ¶
View Source
const ErrTemplate = `{"status":"%s","answer":{"status":"%s","errors":[{"error_code":"%s","error_text":%s}]}}`
View Source
const TXTDataKey = "txtdata"
View Source
const TXTKey = "TXT"
Variables ¶
This section is empty.
Functions ¶
func PopTXTRecordByValue ¶
func PushTXTRecord ¶
Types ¶
type ApiClient ¶
type ApiClient struct {
// contains filtered or unexported fields
}
func NewApiClient ¶
func (*ApiClient) ChangeRecords ¶
func (a *ApiClient) ChangeRecords(fqdn string, records Records, credentials Credentials) error
type BegetApiMock ¶
Simplified API-mock, accepting json POST's
func NewBegetApiMock ¶
func NewBegetApiMock(login string, passwd string) *BegetApiMock
func (*BegetApiMock) DnsChangeRecords ¶
func (b *BegetApiMock) DnsChangeRecords(w http.ResponseWriter, req *http.Request)
func (*BegetApiMock) DnsGetData ¶
func (b *BegetApiMock) DnsGetData(w http.ResponseWriter, req *http.Request)
The real API gives back results only if the domain is created in beget's panel
func (*BegetApiMock) Run ¶
func (b *BegetApiMock) Run(addr string) error
func (*BegetApiMock) RunDns ¶
func (b *BegetApiMock) RunDns(port string)
type ChangeRecordsRequest ¶
type ChangeRecordsResponse ¶
type Credentials ¶
type GetDataRequest ¶
type GetDataRequest struct {
FQDN string `json:"fqdn"`
}
type GetDataResponse ¶
type GetDataResponse struct { Status string `json:"status"` Answer struct { Status string `json:"status"` Result GetDataResult `json:"result"` } `json:"answer"` }
type GetDataResult ¶
Click to show internal directories.
Click to hide internal directories.