internal

package
v0.0.0-...-4f4ac90 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: MIT Imports: 8 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(zoneName string, record Record) (int64, error)

AddRecord adds a record.

func (*Client) DeleteRecord

func (c *Client) DeleteRecord(zoneName string, id int64) error

DeleteRecord deletes a record.

func (*Client) EditRecord

func (c *Client) EditRecord(zoneName string, id int64, record Record) error

EditRecord updates a record.

func (*Client) GetRecords

func (c *Client) GetRecords(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.

Jump to

Keyboard shortcuts

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