internal

package
v4.12.1 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OAuthStaticAccessToken added in v4.12.0

func OAuthStaticAccessToken(client *http.Client, accessToken string) *http.Client

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client Netlify API client.

func NewClient

func NewClient(hc *http.Client) *Client

NewClient creates a new Client.

func (*Client) CreateRecord

func (c *Client) CreateRecord(ctx context.Context, zoneID string, record DNSRecord) (*DNSRecord, error)

CreateRecord creates a DNS records.

func (*Client) GetRecords

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

GetRecords gets a DNS records.

func (*Client) RemoveRecord

func (c *Client) RemoveRecord(ctx context.Context, 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