config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlagSet added in v1.0.0

func FlagSet() *flag.FlagSet

func Validate added in v1.0.0

func Validate(conf *Config) error

Types

type Config

type Config struct {
	ConfigFile string  `koanf:"configfile"`
	Log        Log     `koanf:"log"`
	Http       Http    `koanf:"http"`
	OpenVpn    OpenVpn `koanf:"openvpn"`
	Oauth2     OAuth2  `koanf:"oauth2"`
}

type Http added in v1.0.0

type Http struct {
	Listen        string `koanf:"listen"`
	CertFile      string `koanf:"cert"`
	KeyFile       string `koanf:"key"`
	Tls           bool   `koanf:"tls"`
	BaseUrl       string `koanf:"baseurl"`
	SessionSecret string `koanf:"sessionsecret"`
}

type Log added in v1.0.0

type Log struct {
	Level string `koanf:"level"`
}

type OAuth2 added in v1.0.0

type OAuth2 struct {
	Issuer   string         `koanf:"issuer"`
	Client   OAuth2Client   `koanf:"client"`
	Scopes   []string       `koanf:"scopes"`
	Pkce     bool           `koanf:"pkce"`
	Validate OAuth2Validate `koanf:"validate"`
}

type OAuth2Client added in v1.0.0

type OAuth2Client struct {
	Id     string `koanf:"id"`
	Secret string `koanf:"secret"`
}

type OAuth2Validate added in v1.0.0

type OAuth2Validate struct {
	Groups []string `koanf:"groups"`
	Roles  []string `koanf:"roles"`
	IpAddr bool     `koanf:"ipaddr"`
}

type OpenVpn added in v1.0.0

type OpenVpn struct {
	Addr     string `koanf:"addr"`
	Password string `koanf:"password"`
}

Jump to

Keyboard shortcuts

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