authorizer

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeneratePermission

func GeneratePermission[T UintSeq](bitIdx int) []T

func RemovePermission

func RemovePermission[T UintSeq](origin []T, permissions ...[]T) []T

func SumPermission

func SumPermission[T UintSeq](permissions ...[]T) []T

func ValidPermission

func ValidPermission[T UintSeq](origin, permission []T) bool

Types

type PermissionCode

type PermissionCode int

func (PermissionCode) Code

func (p PermissionCode) Code() []uint64

func (PermissionCode) Uint16Code

func (p PermissionCode) Uint16Code() []uint16

func (PermissionCode) Uint32Code

func (p PermissionCode) Uint32Code() []uint32

func (PermissionCode) Uint64Code

func (p PermissionCode) Uint64Code() []uint64

func (PermissionCode) Uint8Code

func (p PermissionCode) Uint8Code() []uint8

type UintSeq

type UintSeq interface {
	~uint8 | ~uint16 | ~uint32 | ~uint64
}

Jump to

Keyboard shortcuts

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