config

package
v0.0.0-...-2195a28 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IsValidUsername = regexp.MustCompile(`^([a-zA-Z0-9]+)(\.[a-zA-Z0-9]+)*$`).MatchString

Functions

func InitializeConfigs

func InitializeConfigs(force bool) error

Types

type Config

type Config struct {
	Users     Users
	SSHConfig *ssh.ServerConfig `json:"-"`
}

func LoadConfig

func LoadConfig() (config Config, err error)

type User

type User struct {
	Username string
	Keys     []ssh.PublicKey
}

func (User) CheckKey

func (user User) CheckKey(target ssh.PublicKey) bool

type Users

type Users map[string]User

func (Users) LookupUser

func (users Users) LookupUser(username string) (User, []string, bool)

Jump to

Keyboard shortcuts

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