casbin

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2018 License: MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachToAdmin

func AttachToAdmin(username string)

将RoleAdmin分组的所有权限授予给username

func AttachToAnonymous

func AttachToAnonymous(username string)

将RoleAnonymous分组的所有权限授予给username

func AttachToUser

func AttachToUser(username string)

将RoleUser分组的所有权限授予给username

func Init

func Init()

func InitPolicy

func InitPolicy()

Types

type Casbin

type Casbin struct {
	// contains filtered or unexported fields
}
var (
	CasbinMiddleware *Casbin
)

func New

func New(e *casbin.Enforcer) *Casbin

func (*Casbin) ServeHTTP

func (c *Casbin) ServeHTTP(ctx iris.Context)

Jump to

Keyboard shortcuts

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