casbin

package
v0.0.0-...-b509d7c Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RBAC             string = "rbac"
	RBACMultiple     string = "rbac_multiple"
	RBACMultipleRole string = "rbac_multiple_role"

	RBACAdapterXorm  string = "xorm"
	RBACAdapterRedis string = "redis"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AdapterRedis

type AdapterRedis struct {
	Tag string
}

type AdapterXorm

type AdapterXorm struct {
	Engine *xorm.Engine
	Table  string
}

type PoT

type PoT struct {
	Mod         string
	Adapter     string
	AdapterInfo interface{}
	// contains filtered or unexported fields
}

func New

func New() *PoT

func (*PoT) Add

func (rbac *PoT) Add(d ...interface{}) error

func (*PoT) Check

func (rbac *PoT) Check(d ...interface{}) (bool, error)

func (*PoT) Enforcer

func (rbac *PoT) Enforcer() error

Jump to

Keyboard shortcuts

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