user

package
v0.0.0-...-9853328 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PermRead  = iota // download
	PermWrite        // upload

	PermCount
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Perm

type Perm int

func (Perm) String

func (p Perm) String() string

type User

type User struct {
	// contains filtered or unexported fields
}

func (*User) Clone

func (user *User) Clone() *User

func (*User) Contains

func (user *User) Contains(perms ...string) bool

Contains returns true when user possess perm to be specified

func (*User) Grant

func (user *User) Grant(perms ...string)

func (*User) Name

func (user *User) Name() string

func (*User) Revoke

func (user *User) Revoke(perms ...string)

func (*User) String

func (user *User) String() string

type UserGroup

type UserGroup struct {
	// contains filtered or unexported fields
}

func NewUserGroup

func NewUserGroup(file ...string) *UserGroup

func (*UserGroup) Add

func (group *UserGroup) Add(u *User)

func (*UserGroup) Get

func (group *UserGroup) Get(name string) *User

func (*UserGroup) Load

func (group *UserGroup) Load(file string)

func (*UserGroup) String

func (group *UserGroup) String() string

Jump to

Keyboard shortcuts

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