internal

package
v4.14.4 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: MIT Imports: 11 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 {
	BaseResponse
	Domain string  `json:"domain,omitempty"`
	Record *Record `json:"record,omitempty"`
}

type BaseResponse

type BaseResponse struct {
	Success string `json:"success"`
	Error   string `json:"error,omitempty"`
}

func (BaseResponse) GetError

func (r BaseResponse) GetError() string

func (BaseResponse) GetSuccess

func (r BaseResponse) GetSuccess() string

type Client

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

func NewClient

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

func (*Client) AddRecord

func (c *Client) AddRecord(ctx context.Context, payload Record) (*Record, error)

func (*Client) GetRecords

func (c *Client) GetRecords(ctx context.Context, domain string) ([]Record, error)

func (*Client) RemoveRecord

func (c *Client) RemoveRecord(ctx context.Context, payload Record) (int, error)

type ListResponse

type ListResponse struct {
	BaseResponse
	Domain  string   `json:"domain,omitempty"`
	Records []Record `json:"records,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 {
	BaseResponse
	Domain   string `json:"domain,omitempty"`
	RecordID int    `json:"record_id,omitempty"`
}

type Response

type Response interface {
	GetSuccess() string
	GetError() string
}

Jump to

Keyboard shortcuts

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