config

package
v0.0.0-...-dc44bb0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 4 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 {
	APIServerPassword   string
	APIServerPublicKey  string
	APIServerTunnelIP   string
	APIServerURL        string
	APIServerUsername   string
	APIServerEndpoint   string
	LogLevel            string
	PrivateKey          string
	PrometheusAddress   string
	DeviceIPv4          string `envconfig:"TUNNELIP"`
	DeviceIPv6          string `envconfig:"TUNNELIPV6"`
	WireGuardEnabled    bool
	WireGuardConfigPath string
	WireGuardIPv4       *netip.Prefix `ignored:"true"`
	WireGuardIPv6       *netip.Prefix `ignored:"true"`
}

func DefaultConfig

func DefaultConfig() Config

func (Config) GetPassword

func (cfg Config) GetPassword() string

func (Config) GetUsername

func (cfg Config) GetUsername() string

func (Config) GetWireGuardConfigPath

func (cfg Config) GetWireGuardConfigPath() string

func (*Config) Parse

func (c *Config) Parse() error

func (Config) ValidateWireGuard

func (c Config) ValidateWireGuard() error

func (Config) WriteWireGuardBase

func (cfg Config) WriteWireGuardBase(w io.Writer) error

Jump to

Keyboard shortcuts

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