conf

package
v0.0.0-...-c94abcc Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2022 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateConfigPath

func ValidateConfigPath(path string) error

ValidateConfigPath just makes sure, that the path provided is a file, that can be read

Types

type Config

type Config struct {
	Loglevel string `yaml:"loglevel"`
	Logfile  string `yaml:"logfile"`

	Pfctl struct {
		Enable bool   `yaml:"enable"`
		Path   string `yaml:"path"`   // path for the pfctl binary default `/sbin/pfctl`
		Suffix string `yaml:"suffix"` // suffix to use for client tables default `_clients`
	} `yaml:"pfctl"`

	Mysql struct {
		Host       string `yaml:"host"` //protocol[(address)]
		Username   string `yaml:"username"`
		Password   string `yaml:"password"`
		Database   string `yaml:"database"`
		Properties string `yaml:"properties"`
	} `yaml:"mysql"`

	Memcache struct {
		Host       string `yaml:"host"`     // Host:port or /var/run/...
		Username   string `yaml:"username"` // These are not used currently
		Password   string `yaml:"password"` // These are not used currently
		Properties string `yaml:"properties"`
	} `yaml:"memcache"`
}

Config struct for our configuration settings

func NewConfig

func NewConfig(configPath string) (*Config, error)

NewConfig returns a new decoded Config struct

func (*Config) GetDSN

func (c *Config) GetDSN() string

func (*Config) InitLogger

func (conf *Config) InitLogger()

func (*Config) SetLogfile

func (conf *Config) SetLogfile()

func (*Config) SetLoglevel

func (conf *Config) SetLoglevel()

type Environment

type Environment struct {
	ID       string `json:"common_name"`
	Mode     string `json:"script_type"`
	LocalIP  string `json:"ifconfig_pool_remote_ip"`
	RemoteIP string `json:"untrusted_ip"`
}

func (*Environment) Initialize

func (env *Environment) Initialize()

Jump to

Keyboard shortcuts

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