manager

package
v0.0.0-...-a9765df Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Extension sets the extension of the files holding the records infos
	Extension = "bindman"
)

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(flags *pflag.FlagSet)

AddFlags adds flags for Options.

Types

type Bind9Manager

type Bind9Manager struct {
	*Builder
	DNSRecords *diskv.Diskv
	Door       *sync.RWMutex
	DNSUpdater nsupdate.DNSUpdater
}

Bind9Manager holds the information for managing a bind9 dns server

func (*Bind9Manager) AddDNSRecord

func (m *Bind9Manager) AddDNSRecord(record hookTypes.DNSRecord) (err error)

AddDNSRecord adds a new DNS record

func (*Bind9Manager) GetDNSRecord

func (m *Bind9Manager) GetDNSRecord(name, recordType string) (record *hookTypes.DNSRecord, err error)

GetDNSRecord retrieves the dns record identified by name

func (*Bind9Manager) GetDNSRecords

func (m *Bind9Manager) GetDNSRecords() (records []hookTypes.DNSRecord, err error)

GetDNSRecords retrieves all the dns records being managed

func (*Bind9Manager) HasDNSRecord

func (m *Bind9Manager) HasDNSRecord(name, recordType string) bool

GetDNSRecord retrieves the dns record identified by name

func (*Bind9Manager) RemoveDNSRecord

func (m *Bind9Manager) RemoveDNSRecord(name, recordType string) error

RemoveDNSRecord removes a DNS record

func (*Bind9Manager) UpdateDNSRecord

func (m *Bind9Manager) UpdateDNSRecord(record hookTypes.DNSRecord) (err error)

UpdateDNSRecord updates an existing dns record

type Builder

type Builder struct {
	TTL          time.Duration
	RemovalDelay time.Duration
}

func (*Builder) InitFromViper

func (b *Builder) InitFromViper(v *viper.Viper) *Builder

InitFromViper initializes Options with properties retrieved from Viper.

func (*Builder) New

func (b *Builder) New(dnsupdater nsupdate.DNSUpdater, basePath string) (*Bind9Manager, error)

New creates a new Bind9Manager

Jump to

Keyboard shortcuts

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