config

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2025 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPath

func GetPath() string

Types

type Config

type Config struct {
	DDNS   DDNSConfig   `toml:"ddns"`
	Lookup LookupConfig `toml:"lookup"`
	Notify NotifyConfig `toml:"notify"`
}

func LoadConfig

func LoadConfig() (*Config, error)

type DDNSConfig

type DDNSConfig struct {
	Provider string        `toml:"provider"`
	NoIP     NoIPConfig    `toml:"noip"`
	DuckDNS  DuckDNSConfig `toml:"duckdns"`
}

type DuckDNSConfig

type DuckDNSConfig struct {
	Domain string `toml:"domain"`
	Token  string `toml:"token"`
}

type LookupConfig

type LookupConfig struct {
	Servers  []string      `toml:"servers"`
	Interval time.Duration `toml:"interval"`
}

type NoIPConfig

type NoIPConfig struct {
	Hostname  string `toml:"hostname"`
	UserMail  string `toml:"user_mail"`
	Password  string `toml:"password"`
	UserAgent string `toml:"user_agent"`
}

type NotifyConfig

type NotifyConfig struct {
	Enabled bool   `toml:"enabled"`
	Email   string `toml:"email"`
	SMTP    struct {
		Host        string `toml:"host"`
		Port        int    `toml:"port"`
		Username    string `toml:"username"`
		Password    string `toml:"password"`
		From        string `toml:"from"`
		UseTLS      bool   `toml:"use_tls"`
		UseSTARTTLS bool   `toml:"use_starttls"`
	} `toml:"smtp"`
}

Jump to

Keyboard shortcuts

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