config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const LogFormatJson = "json"
View Source
const LogFormatSimple = "simple"

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Interval uint      `yaml:"interval" env-default:"600"`
	WebUI    bool      `yaml:"webUI" env-default:"false"`
	Log      LogConfig `yaml:"log"`
	Zones    Zones     `yaml:"zones"`
	DNS      DNS       `yaml:"dns"`
	Domains  Domains   `yaml:"domains"`
}

type DNS

type DNS struct {
	EnableIP4    bool `yaml:"a"`
	EnableIP6    bool `yaml:"aaaa"`
	DefaultTTL   int  `yaml:"defaultTTL" env-default:"300"`
	PurgeUnknown bool `yaml:"purgeUnknown" env-default:"false"`
}

type DomainRecord

type DomainRecord struct {
	Name    string `yaml:"name" label:"dockdns.name"`
	IP4     string `yaml:"a" label:"dockdns.a"`
	IP6     string `yaml:"aaaa" label:"dockdns.aaaa"`
	TTL     int    `yaml:"ttl" label:"dockdns.ttl"`
	Proxied bool   `yaml:"proxied" label:"dockdns.proxied"`
}

func (DomainRecord) GetIP

func (d DomainRecord) GetIP(recordType string) string

type Domains

type Domains []DomainRecord

type LogConfig

type LogConfig struct {
	Level  string    `yaml:"level" env-default:"info"`
	Format LogFormat `yaml:"format" env-default:"simple"`
}

type LogFormat

type LogFormat string

type Zone added in v0.1.0

type Zone struct {
	Provider string `yaml:"provider"`
	Name     string `yaml:"name"`
	ApiToken string `yaml:"apiToken"`
	ZoneID   string `yaml:"zoneID"`
}

type Zones added in v0.1.0

type Zones []Zone

Jump to

Keyboard shortcuts

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