hetzner

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnauthorized = errors.New("request unauthorized")
	ErrZoneNotFound = errors.New("zone not found")
)

Functions

This section is empty.

Types

type Client

type Client interface {
	UpdateRecord(id string, update Record) error
}

func New

func New(authToken string) Client

func NewWithClient

func NewWithClient(hc *http.Client, authToken string) Client

type Record

type Record struct {
	ID     string     `json:"id,omitempty"`
	ZoneID string     `json:"zone_id"`
	Type   RecordType `json:"type"`
	Name   string     `json:"name"`
	Value  string     `json:"value"`
	TTL    uint       `json:"ttl"`
}

type RecordType

type RecordType string
const (
	TypeA    RecordType = "A"
	TypeAAAA RecordType = "AAAA"
)

Jump to

Keyboard shortcuts

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