internal

package
v4.15.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 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 added in v4.12.0

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

func (BaseResponse) GetError added in v4.12.0

func (r BaseResponse) GetError() string

func (BaseResponse) GetSuccess added in v4.12.0

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 added in v4.12.0

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