internal

package
v4.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddResponse

type AddResponse struct {
	Domain  string  `json:"domain,omitempty"`
	Record  *Record `json:"record,omitempty"`
	Success string  `json:"success"`
	Error   string  `json:"error,omitempty"`
}

type Client

type Client struct {
	HTTPClient *http.Client
	BaseURL    string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(pddToken string) (*Client, error)

func (*Client) AddRecord

func (c *Client) AddRecord(data Record) (*Record, error)

func (*Client) GetRecords

func (c *Client) GetRecords(domain string) ([]Record, error)

func (*Client) RemoveRecord

func (c *Client) RemoveRecord(data Record) (int, error)

type ListResponse

type ListResponse struct {
	Domain  string   `json:"domain,omitempty"`
	Records []Record `json:"records,omitempty"`
	Success string   `json:"success"`
	Error   string   `json:"error,omitempty"`
}

type Record

type Record struct {
	ID        int    `json:"record_id,omitempty" url:"record_id,omitempty"`
	Domain    string `json:"domain,omitempty" url:"domain,omitempty"`
	SubDomain string `json:"subdomain,omitempty" url:"subdomain,omitempty"`
	FQDN      string `json:"fqdn,omitempty" url:"fqdn,omitempty"`
	TTL       int    `json:"ttl,omitempty" url:"ttl,omitempty"`
	Type      string `json:"type,omitempty" url:"type,omitempty"`
	Content   string `json:"content,omitempty" url:"content,omitempty"`
}

type RemoveResponse

type RemoveResponse struct {
	Domain   string `json:"domain,omitempty"`
	RecordID int    `json:"record_id,omitempty"`
	Success  string `json:"success"`
	Error    string `json:"error,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL