internal

package
v4.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2020 License: MIT Imports: 7 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
	BaseURL    string
	// contains filtered or unexported fields
}

Client Netlify API client.

func NewClient

func NewClient(token string) *Client

NewClient creates a new Client.

func (*Client) CreateRecord

func (c *Client) CreateRecord(zoneID string, record DNSRecord) (*DNSRecord, error)

CreateRecord creates a DNS records.

func (*Client) GetRecords

func (c *Client) GetRecords(zoneID string) ([]DNSRecord, error)

GetRecords gets a DNS records.

func (*Client) RemoveRecord

func (c *Client) RemoveRecord(zoneID, recordID string) error

RemoveRecord removes a DNS records.

type DNSRecord

type DNSRecord struct {
	ID       string `json:"id,omitempty"`
	Hostname string `json:"hostname,omitempty"`
	TTL      int    `json:"ttl,omitempty"`
	Type     string `json:"type,omitempty"`
	Value    string `json:"value,omitempty"`
}

DNSRecord DNS record representation.

Jump to

Keyboard shortcuts

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