client

package
v0.0.0-...-3693aea Latest Latest
Warning

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

Go to latest
Published: May 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetZone

func GetZone(ctx context.Context, fqdn string) (string, error)

GetZone attempts to read the SOA Record of fqdn reducing shortening the domain by one lever with each unsuccessfull iteration

Types

type Client

type Client struct {
	Server        *string
	TsigKeyName   string
	TsigSecret    string
	TsigAlgorithm string
}

Client contains configuration and provides functions that use said configuration for the creation of RFC2136 records.

func NewClient

func NewClient(tsigKeyName, tsigSecret, tsigAlgorithm string, server *string) *Client

NewClient creates a new Client

func (*Client) CreateOrUpdate

func (c *Client) CreateOrUpdate(ctx context.Context, zone, name string, recordType string, value []string, ttl int64) error

CreateOrUpdate an A, AAAA, CNAME, or TXT record

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, zone, name string, recordType string, value []string) error

Delete removes the given DNS Record

Jump to

Keyboard shortcuts

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