Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) CreateRecord(p CreateRecordParameter) (r *Record, err error)
- func (c *Client) CreateZone(p CreateZoneParameter) (z *Zone, err error)
- func (c *Client) DeleteRecord(zoneid, recordid string) (err error)
- func (c *Client) DeleteZone(zoneid string) (err error)
- func (c *Client) Record(zoneid, recordid string) (r *Record, err error)
- func (c *Client) Records(zoneid string) (rs []*Record, err error)
- func (c *Client) Request(method, path string, param map[string]interface{}) ([]byte, error)
- func (c *Client) UpdateRecord(p UpdateRecordParameter) (r *Record, err error)
- func (c *Client) UpdateZone(p UpdateZoneParameter) (z *Zone, err error)
- func (c *Client) VerifyZone(zoneid string) (err error)
- func (c *Client) Zone(zoneid string) (z *Zone, err error)
- func (c *Client) Zones() (zs []*Zone, err error)
- type CreateRecordParameter
- type CreateZoneParameter
- type Record
- type UpdateRecordParameter
- type UpdateZoneParameter
- type Zone
Constants ¶
View Source
const EndPoint = "https://dns.idcfcloud.com"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { EndPoint string APIKey string SecretKey string // contains filtered or unexported fields }
func (*Client) CreateRecord ¶
func (c *Client) CreateRecord(p CreateRecordParameter) (r *Record, err error)
func (*Client) CreateZone ¶
func (c *Client) CreateZone(p CreateZoneParameter) (z *Zone, err error)
func (*Client) DeleteRecord ¶
func (*Client) DeleteZone ¶
func (*Client) UpdateRecord ¶
func (c *Client) UpdateRecord(p UpdateRecordParameter) (r *Record, err error)
func (*Client) UpdateZone ¶
func (c *Client) UpdateZone(p UpdateZoneParameter) (z *Zone, err error)
func (*Client) VerifyZone ¶
type CreateRecordParameter ¶
type CreateRecordParameter map[string]interface{}
func NewCreateRecordParamter ¶
func NewCreateRecordParamter( zoneid, name, recordType, content string) CreateRecordParameter
func (CreateRecordParameter) SetPriority ¶
func (p CreateRecordParameter) SetPriority(priority int)
func (CreateRecordParameter) SetTTL ¶
func (p CreateRecordParameter) SetTTL(ttl int)
type CreateZoneParameter ¶
type CreateZoneParameter map[string]interface{}
func NewCreateZoneParamter ¶
func NewCreateZoneParamter(name, email string) CreateZoneParameter
func (CreateZoneParameter) SetDefaultTTL ¶
func (p CreateZoneParameter) SetDefaultTTL(ttl int)
func (CreateZoneParameter) SetDescription ¶
func (p CreateZoneParameter) SetDescription(description string)
type Record ¶
type Record struct { UUID string Name string Type string TTL int Content interface{} Priority int CreatedAt time.Time UpdatedAt time.Time }
func (*Record) UnmarshalJSON ¶
type UpdateRecordParameter ¶
type UpdateRecordParameter map[string]interface{}
func NewUpdateRecordParamter ¶
func NewUpdateRecordParamter(zoneid, recordid string) UpdateRecordParameter
func (UpdateRecordParameter) SetContent ¶
func (p UpdateRecordParameter) SetContent(content interface{})
func (UpdateRecordParameter) SetName ¶
func (p UpdateRecordParameter) SetName(name string)
func (UpdateRecordParameter) SetPriority ¶
func (p UpdateRecordParameter) SetPriority(priority int)
func (UpdateRecordParameter) SetTTL ¶
func (p UpdateRecordParameter) SetTTL(ttl int)
func (UpdateRecordParameter) SetType ¶
func (p UpdateRecordParameter) SetType(recordType string)
type UpdateZoneParameter ¶
type UpdateZoneParameter map[string]interface{}
func NewUpdateZoneParamter ¶
func NewUpdateZoneParamter(zoneid string) UpdateZoneParameter
func (UpdateZoneParameter) SetDefaultTTL ¶
func (p UpdateZoneParameter) SetDefaultTTL(ttl int)
func (UpdateZoneParameter) SetDescription ¶
func (p UpdateZoneParameter) SetDescription(description string)
Click to show internal directories.
Click to hide internal directories.