users

package
v0.5.1-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CfgUsers = "users.users"
)

Variables

View Source
var CoreComponent *app.CoreComponent
View Source
var ParamsUsers = &ParametersUsers{
	Users: map[string]*User{
		"wasp": {
			PasswordHash: "c34ec258dd87938c9c19228f7062ef17c847ed9fac4f9a284ccfebdbff08e3f9",
			PasswordSalt: "db32d4f152a3dadd81cd9b71074a4ea3346dbf8ff1998d33e9452091fff6f503",
			Permissions: []string{
				permissions.API,
				permissions.Write,
			},
		},
	},
}

Functions

This section is empty.

Types

type ParametersUsers

type ParametersUsers struct {
	Users map[string]*User `noflag:"true" usage:"the list of accepted users"`
}

type User

type User struct {
	PasswordHash string   `default:"0000000000000000000000000000000000000000000000000000000000000000" usage:"the auth password+salt as a scrypt hash"`
	PasswordSalt string   `` /* 126-byte string literal not displayed */
	Permissions  []string `default:"" usage:"permissions of the user"`
}

func (*User) PermissionsMap

func (u *User) PermissionsMap() map[string]struct{}

PermissionsMap returns the permissions of the user as a map.

Jump to

Keyboard shortcuts

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