Documentation ¶
Index ¶
- Variables
- func EncodeConfig(c Config) []byte
- func Env(name string) string
- func EnvBool(name string) bool
- func EnvDuration(name string, def time.Duration) time.Duration
- func EnvInt(name string, def int) int
- func L4Proto(s string) (head, proto string)
- func ParseAuth(auth string) (string, string)
- type Config
- type Remote
- type Remotes
- type User
- type UserIndex
- type Users
Constants ¶
This section is empty.
Variables ¶
View Source
var UserAllowAll = regexp.MustCompile(".*")
Functions ¶
func EncodeConfig ¶
func EnvDuration ¶
EnvDuration returns a duration using an environment variable, with a default fallback
Types ¶
type Config ¶
func DecodeConfig ¶
type Remote ¶
type Remote struct { UserAddress string LocalHost, LocalPort string RemoteHost, RemotePort string Reverse bool }
func DecodeRemote ¶
type User ¶
type User struct { Name string `json:"username"` Pass string `json:"password"` Addrs []*regexp.Regexp `json:"addresses"` IsAdmin bool `json:"is_admin"` }
func (*User) ValidateUser ¶
ValidateUser validates the fields of the User struct
type UserIndex ¶
UserIndex is a reloadable user source
func NewUserIndex ¶
NewUserIndex creates a source for users
func (*UserIndex) WriteUsers ¶
WriteUsers writes the current users to the configuration file
Click to show internal directories.
Click to hide internal directories.