config

package
v0.0.0-...-faba23a Latest Latest
Warning

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

Go to latest
Published: May 20, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyDefaults

func ApplyDefaults(config *ConfigArr, lastModified time.Time)

Types

type Config

type Config struct {
	Records map[DomainLookup][]Records
	Domain  map[string]Domain
	Mu      sync.RWMutex
}

func GenerateTestDomains

func GenerateTestDomains(num int) (t Config)

func ReadZoneFiles

func ReadZoneFiles(zone_dir string) (t Config)

func (Config) AddZone

func (t Config) AddZone(myconfig ConfigArr)

func (Config) DeleteZone

func (t Config) DeleteZone(domain string)

func (Config) MonitorConfig

func (config Config) MonitorConfig(zone_dir string)

type ConfigArr

type ConfigArr struct {
	Version  float32
	Domain   Domain
	Defaults Defaults
	Records  []Records
}

func ReadZone

func ReadZone(zone_file string, lastModified time.Time) (myconfig ConfigArr, err error)

type Defaults

type Defaults struct {
	TTL   uint32
	Type  uint16
	Class uint16
}

type Domain

type Domain struct {
	Domain    string
	SOA       string
	Created   time.Time
	Modified  time.Time
	Verified  bool
	Active    bool
	OwnerID   uint32
	RecordRef []DomainLookup
}

type DomainLookup

type DomainLookup struct {
	Domain string
	Type   uint16
	Class  uint16
}

type DomainTable

type DomainTable struct {
	Domain string
}

type Records

type Records struct {
	Domain     string
	Root       string
	TTL        uint32
	Type       uint16
	Class      uint16
	Preference uint16
	Address    string
}

Jump to

Keyboard shortcuts

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