Documentation ¶
Index ¶
- func InitRoot(ctx context.Context, db *config.DB, token string) (bool, error)
- func IsInvalidCredential(err error) bool
- func UpdatePermissions(ctx context.Context, db *config.DB, user string, permissions Permissions) error
- func UpsertUser(ctx context.Context, db *config.DB, user, passwd string) error
- func WithPermissions(ctx context.Context, perm Permissions) context.Context
- type ErrInvalidCredentials
- type Permissions
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsInvalidCredential ¶
func UpdatePermissions ¶
func WithPermissions ¶
func WithPermissions(ctx context.Context, perm Permissions) context.Context
Types ¶
type ErrInvalidCredentials ¶
type ErrInvalidCredentials struct{}
func (ErrInvalidCredentials) Error ¶
func (ErrInvalidCredentials) Error() string
type Permissions ¶
func CheckCredential ¶
func GetPermissions ¶
func GetPermissions(ctx context.Context) Permissions
type User ¶
type User struct { Name string `msgpack:"name"` SaltedToken []byte `msgpack:"salted_token"` Permissions *Permissions `msgpack:"permissions"` }
Click to show internal directories.
Click to hide internal directories.