mycasbin

package
v0.0.0-...-5845281 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package role provides ...

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Casbin

func Casbin() *casbin.Enforcer

持久化到数据库

Types

type CasbinModel

type CasbinModel struct {
	ID       bson.ObjectId `json:"id" bson:"_id"`
	Ptype    string        `json:"ptype" bson:"ptype"`
	RoleName string        `json:"rolename" bson:"v0"`
	Path     string        `json:"path" bson:"v1"`
	Method   string        `json:"method" bson:"v2"`
}

权限结构

func (*CasbinModel) AddCasbin

func (c *CasbinModel) AddCasbin(cm CasbinModel) bool

添加权限

Jump to

Keyboard shortcuts

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