dnsmgmt

package
v1.2.5 Latest Latest
Warning

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

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

Documentation

Overview

Package dnsmgmt manages DNS entries

Index

Constants

View Source
const LocalTestZone = "localtest.net"

Variables

This section is empty.

Functions

func GetProviderNames

func GetProviderNames() []dnsapi.ProviderType

func PlatformRecordTypeAllowed

func PlatformRecordTypeAllowed(rtype string) bool

PlatformRecordTypeAllowed restricts the record types that can be created by external platform services (like CRM, etc).

Types

type DNSMgr

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

func NewDNSMgr

func NewDNSMgr(vaultConfig *vault.Config, allowedZones []string) *DNSMgr

NewDNSMgr creates a new DNS manager that will look for DNS API credentials in Vault, and only allow modification of the specified zones.

func (*DNSMgr) CreateOrUpdateDNSRecord

func (s *DNSMgr) CreateOrUpdateDNSRecord(ctx context.Context, name, rtype, content string, ttl int, proxy bool) error

func (*DNSMgr) DeleteDNSRecord

func (s *DNSMgr) DeleteDNSRecord(ctx context.Context, name string) error

func (*DNSMgr) GetDNSRecords

func (s *DNSMgr) GetDNSRecords(ctx context.Context, name string) ([]dnsapi.Record, error)

func (*DNSMgr) InfoContext

func (s *DNSMgr) InfoContext(ctx context.Context, msg string, keysAndValues ...interface{})

type TestProvider

type TestProvider struct{}

func (*TestProvider) CreateOrUpdateDNSRecord

func (s *TestProvider) CreateOrUpdateDNSRecord(ctx context.Context, zone, name, rtype, content string, ttl int, proxy bool) error

func (*TestProvider) DeleteDNSRecord

func (s *TestProvider) DeleteDNSRecord(ctx context.Context, zone, name string) error

func (*TestProvider) GetDNSRecords

func (s *TestProvider) GetDNSRecords(ctx context.Context, zone, name string) ([]dnsapi.Record, error)

Jump to

Keyboard shortcuts

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