rbac

package
v0.0.0-...-d595cb9 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddImplied

func AddImplied(object string, source int64, target int64) int64

func IsPermit

func IsPermit(permissionMapping PermissionMapping, object Object, target interface{}) bool

Types

type GeneralPermission

type GeneralPermission int64
const (
	Read GeneralPermission = 1 << iota
	Create
	Update
	Delete
)

type Object

type Object string
const (
	User Object = "user"
)

type PermissionMapping

type PermissionMapping map[string]int64

type UserPermission

type UserPermission int64
const (
	BulkInsert UserPermission = 1 << (iota + lengthGeneralPermission)
	BulkDelete
)

Jump to

Keyboard shortcuts

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