config

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Url      string
	Username string
	Password string
}

type EnvConfig

type EnvConfig struct {
	Urls      []string `env:"ADGUARD_SERVERS"`
	Usernames []string `env:"ADGUARD_USERNAMES"`
	Passwords []string `env:"ADGUARD_PASSWORDS"`
}

func (*EnvConfig) Validate

func (e *EnvConfig) Validate() error

type Global

type Global struct {
	Server  Server
	Configs []Config
}

func FromEnv

func FromEnv() (*Global, error)

type Server

type Server struct {
	Interval time.Duration `env:"INTERVAL, default=30s"`
}

Jump to

Keyboard shortcuts

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