Versions in this module Expand all Collapse all v0 v0.1.1 Jun 30, 2020 v0.1.0 Jun 30, 2020 Changes in this version + const CodeNoRecords + const CodeSuccess + type BasicRequest struct + Endpoint string + Method string + func NewBasicRequest(method, endpoint string) BasicRequest + func (req BasicRequest) GetEndpoint() string + func (req BasicRequest) GetMethod() string + type BasicResponse struct + Status StatusResponse + func (resp BasicResponse) Error() error + type Client struct + AppID string + AppToken string + BaseURL string + Language string + func NewClient(appID, appToken string) *Client + func (c *Client) CreateRecord(ctx context.Context, req *CreateRecordRequest) (*CreateRecordResponse, error) + func (c *Client) DeleteRecord(ctx context.Context, req *DeleteRecordRequest) (*DeleteRecordResponse, error) + func (c *Client) Do(ctx context.Context, req Request, resp Response) error + func (c *Client) QueryRecords(ctx context.Context, req *QueryRecordsRequest) (*QueryRecordsResponse, error) + func (c *Client) UpdateRecord(ctx context.Context, req *UpdateRecordRequest) (*UpdateRecordResponse, error) + type CreateRecordRequest struct + Domain string + DomainID string + MX string + RecordLine string + RecordLineID string + RecordType string + Subdomain string + TTL string + Value string + Weight string + func NewCreateRecordRequest(domain, subdomain, recordType, value string) *CreateRecordRequest + type CreateRecordResponse struct + Record RecordResponse + type DeleteRecordRequest struct + Domain string + DomainID string + RecordID string + func NewDeleteRecordRequest(domain, recordID string) *DeleteRecordRequest + type DeleteRecordResponse struct + type Provider struct + func (p *Provider) AppendRecords(ctx context.Context, zone string, recs []libdns.Record) ([]libdns.Record, error) + func (p *Provider) DeleteRecords(ctx context.Context, zone string, recs []libdns.Record) ([]libdns.Record, error) + func (p *Provider) GetRecords(ctx context.Context, zone string) ([]libdns.Record, error) + func (p *Provider) SetRecords(ctx context.Context, zone string, recs []libdns.Record) ([]libdns.Record, error) + type QueryRecordsRequest struct + Domain string + DomainID string + Keyword string + Length string + Offset string + RecordLine string + RecordLineID string + RecordType string + Subdomain string + func NewQueryRecordsRequest(domain string) *QueryRecordsRequest + type QueryRecordsResponse struct + Domain struct{ ... } + Info struct{ ... } + Records []RecordResponse + func (resp QueryRecordsResponse) Error() error + type RecordResponse struct + Enabled string + ID string + Line string + LineID string + MX string + Name string + Remark string + Status string + TTL string + Type string + Value string + Weight string + type Request interface + GetEndpoint func() string + GetMethod func() string + type Response interface + Error func() error + type StatusResponse struct + Code string + CreatedAt string + Message string + func (resp StatusResponse) Error() error + type UpdateRecordRequest struct + Domain string + DomainID string + MX string + RecordID string + RecordLine string + RecordLineID string + RecordType string + Subdomain string + TTL string + Value string + Weight string + func NewUpdateRecordRequest(domain, recordID, recordType, value string) *UpdateRecordRequest + type UpdateRecordResponse struct + Record struct{ ... } + type Values map[string]string + func (vs Values) Del(key string) + func (vs Values) Encode() string + func (vs Values) Get(key string) string + func (vs Values) Set(key, value string)