internal

package
v4.12.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 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 Client

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

Client is a Simply.com API client.

func NewClient

func NewClient(accountName string, apiKey string) (*Client, error)

NewClient creates a new Client.

func (*Client) AddRecord

func (c *Client) AddRecord(ctx context.Context, zoneName string, record Record) (int64, error)

AddRecord adds a record.

func (*Client) DeleteRecord

func (c *Client) DeleteRecord(ctx context.Context, zoneName string, id int64) error

DeleteRecord deletes a record.

func (*Client) EditRecord

func (c *Client) EditRecord(ctx context.Context, zoneName string, id int64, record Record) error

EditRecord updates a record.

func (*Client) GetRecords

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

GetRecords lists all the records in the zone.

type Record

type Record struct {
	ID       int64  `json:"record_id,omitempty"`
	Name     string `json:"name,omitempty"`
	Data     string `json:"data,omitempty"`
	Type     string `json:"type,omitempty"`
	TTL      int    `json:"ttl,omitempty"`
	Priority int    `json:"priority,omitempty"`
}

Record represents the content of a DNS record.

type Response added in v4.12.0

type Response interface {
	GetStatus() int
	GetMessage() string
}

Jump to

Keyboard shortcuts

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