linode

package
v0.0.0-...-f139536 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	APIBaseURL = "https://api.linode.com"

	ErrDomainNotFound = errors.New("failed to find matching domain")
)

Functions

func NewClient

func NewClient(httpClient http.Client, personalAccessToken string) *client

Types

type ARecordUpdate

type ARecordUpdate struct {
	Target string `json:"target"`
}

type Client

type Client interface {
	GetDomainID(domain string) (int, error)
	GetARecords(domainID int, names map[string]struct{}) ([]RetrievedARecord, error)
	UpdateARecord(domainID int, recordID int, update ARecordUpdate) error
}

type RetrievedARecord

type RetrievedARecord struct {
	ID     int    `json:"id"`
	Name   string `json:"name"`
	Target string `json:"target"`
	TTLSec int    `json:"ttl_sec"`
	Type   string `json:"type"`
}

Jump to

Keyboard shortcuts

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