linode

package module
v0.0.0-...-0c3dc2e Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2025 License: MIT Imports: 12 Imported by: 0

README

Linode for libdns

Go Reference

This package implements the libdns interfaces for the Linode API (using the Go implementation from: https://github.com/linode/linodego)

Authenticating

To authenticate you need to supply a Linode API token.

Example

See _example/main.go

Documentation

Overview

Package linode implements a DNS record management client compatible with the libdns interfaces for Linode.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToDomainRecord

func ToDomainRecord(r linodego.DomainRecord) (libdns.Record, error)

Types

type Client

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

type Provider

type Provider struct {
	Client
	// APIToken is the Linode API token - see https://www.linode.com/docs/guides/getting-started-with-the-linode-api/#create-an-api-token
	// Is recommended to only use a token with the Domain access in read/write mode.
	APIToken string `json:"api_token,omitempty"`
}

Provider facilitates DNS record manipulation for Linode.

func (*Provider) AppendRecords

func (p *Provider) AppendRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)

AppendRecords adds records to the zone. It returns the records that were added.

func (*Provider) DeleteRecords

func (p *Provider) DeleteRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)

DeleteRecords deletes the records from the zone. It returns the records that were deleted.

func (*Provider) GetRecords

func (p *Provider) GetRecords(ctx context.Context, zone string) ([]libdns.Record, error)

GetRecords lists all the records in the zone.

func (*Provider) SetRecords

func (p *Provider) SetRecords(ctx context.Context, zone string, records []libdns.Record) ([]libdns.Record, error)

SetRecords sets the records in the zone, either by updating existing records or creating new ones. It returns the updated records.

type Record

type Record struct {
	Record libdns.RR
	ID     int
}

func FromLibdnsRecord

func FromLibdnsRecord(r libdns.Record, id int) Record

func (Record) RR

func (d Record) RR() libdns.RR

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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