config

package
v0.0.0-...-4245874 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseLogLevel

func ParseLogLevel(logLevel string) zapcore.Level

Types

type DDNSConfig

type DDNSConfig struct {
	LoggingConfig LoggingConfig `mapstructure:"logging"`
	Providers     []DomainProviderConfig
	Strategy      *IPMatchingConfig `mapstructure:"strategy"`
	// contains filtered or unexported fields
}

DDNS Config

func LoadConfig

func LoadConfig() *DDNSConfig

loads config

func (*DDNSConfig) GetLogConfig

func (dc *DDNSConfig) GetLogConfig() *LoggingConfig

func (*DDNSConfig) GetRootConfig

func (dc *DDNSConfig) GetRootConfig() *viper.Viper

GetConfig returns configuration

type Domain

type Domain struct {
	URL string
}

type DomainProviderConfig

type DomainProviderConfig struct {
	Type     string
	Enabled  bool
	ApiKey   string
	ApiToken string
	ApiUser  string
	Domains  []Domain
}

type IPMatchingConfig

type IPMatchingConfig struct {
	V4Strategy IPMatchingStrategy `mapstructure:"ipv4"`
	V6Strategy IPMatchingStrategy `mapstructure:"ipv6"`
}

type IPMatchingStrategy

type IPMatchingStrategy struct {
	Type         IPMatchingStrategyKey
	PrefixLength int
}

type IPMatchingStrategyKey

type IPMatchingStrategyKey string
const (
	Prefix IPMatchingStrategyKey = "prefix"
)

type LoggingConfig

type LoggingConfig struct {
	OutFile string
	Level   string
}

func (*LoggingConfig) GetLogLevel

func (c *LoggingConfig) GetLogLevel() zapcore.Level

Jump to

Keyboard shortcuts

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