access

package
v0.0.0-...-53ff5f4 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NMax = 64
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Access

type Access uint64
const (
	Active Access = 1 << iota
	SelfLedger
	ReadLedger
	WriteLedger
)

func (Access) Check

func (a Access) Check(a2 Access) bool

func (Access) String

func (i Access) String() string

type Helper

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

func NewHelperFromPermissions

func NewHelperFromPermissions(permissions ...string) Helper

func (Helper) Access

func (h Helper) Access(permissions ...string) Access

func (Helper) AllPermissions

func (h Helper) AllPermissions() (res []string)

func (Helper) ByAccess

func (h Helper) ByAccess() map[Access]string

func (Helper) ByName

func (h Helper) ByName() map[string]Access

func (Helper) Permissions

func (h Helper) Permissions(a Access) (res []string)

Jump to

Keyboard shortcuts

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