internal

package
v0.0.0-...-d25b310 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OAuthStaticAccessToken

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