permissions

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Perm

type Perm struct {
	Key       string
	Action    string
	Group     PermissionGroup
	AccountID int
}

type PermissionGroup

type PermissionGroup int
const (
	Deity PermissionGroup = iota + 1
	Owner
	Developer
)

type Permissions

type Permissions struct {
	Context context.Context
	Config  config.Config
}

func NewPermissions

func NewPermissions(c config.Config) *Permissions

func (*Permissions) CanDo

func (p *Permissions) CanDo(perm Perm) (bool, error)

func (*Permissions) Store

func (p *Permissions) Store(perm Perm) error

Jump to

Keyboard shortcuts

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