config

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Username string
	Password string
}

type Accounts

type Accounts []Account

func (*Accounts) Decode

func (a *Accounts) Decode(val string) error

type Config

type Config struct {
	Server Server `envconfig:"server"`
	KSEI   KSEI   `envconfig:"ksei"`
}

func FromEnv

func FromEnv() (*Config, error)

type KSEI

type KSEI struct {
	Accounts Accounts `envconfig:"accounts"`
	AuthDir  string   `envconfig:"auth_dir" default:".goksei-auth"`
}

type Server

type Server struct {
	BindHost            string   `envconfig:"bind_host" default:"0.0.0.0"`
	BindPort            int      `envconfig:"bind_port" default:"8080"`
	BasicAuth           []string `envconfig:"basic_auth"`
	MaxRequestsInFlight int      `envconfig:"max_requests_in_flight" default:"3"`
}

func (*Server) BasicAuthCredentials added in v0.2.0

func (s *Server) BasicAuthCredentials() map[string]string

func (*Server) BindAddress

func (s *Server) BindAddress() string

Jump to

Keyboard shortcuts

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