dnsproviders

package
v0.0.0-...-90bae46 Latest Latest
Warning

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

Go to latest
Published: May 23, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CFToken = "CF_API_TOKEN"
)

Variables

This section is empty.

Functions

func IsCurrentEndpoint

func IsCurrentEndpoint(host, address string) (bool, error)

IsCurrentEndpoint checks if the host's DNS record(s) match an IP provided. Do not want 'Not Found' errors returned

Types

type AWS

type AWS struct {
	HostedZoneID string `json:"hostedZoneID"`
	Ttl          int64  `json:"ttl"`
}

func (*AWS) EnsureRecordA

func (a *AWS) EnsureRecordA(ctx context.Context, host, ipAddr string) error

type Cloudflare

type Cloudflare struct {
	ZoneName string `json:"zoneName"`
	Ttl      int    `json:"ttl"`
}

func (*Cloudflare) EnsureRecordA

func (c *Cloudflare) EnsureRecordA(ctx context.Context, host, ipAddr string) error

type Config

type Config struct {
	Aws AWS        `json:"aws,omitempty"`
	Cf  Cloudflare `json:"cloudflare,omitempty"`
}

type Nameserver

type Nameserver interface {
	EnsureRecordA(ctx context.Context, host, ipAddr string) error
}

func NewNameserver

func NewNameserver(nsType string, c Config) (Nameserver, error)

Jump to

Keyboard shortcuts

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