config

package
v0.0.0-...-82a22e8 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2023 License: GPL-3.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveConfig

func SaveConfig(file string, config *Config) (err error)

Types

type Config

type Config struct {
	Bind   string        `yaml:"bind"`
	Logins []ConfigLogin `yaml:"logins"`
}

func DefaultConfig

func DefaultConfig() (config *Config)

func LoadConfig

func LoadConfig(file string) (config *Config, err error)

func (*Config) Authenticate

func (this *Config) Authenticate(username string, password string, passwordSalt string) (ok bool, err error)

type ConfigLogin

type ConfigLogin struct {
	Username string `yaml:"username,omitempty"`
	Regexp   string `yaml:"regexp,omitempty"`

	Password string `yaml:"password"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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