casbin

package
v0.0.0-...-03f4900 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Enforcer *casbin.Enforcer

Functions

func Connect

func Connect()

func RuleAdd

func RuleAdd(identity, path, method string) bool

func RuleCheck

func RuleCheck(identity, path, method string) bool

func RuleDel

func RuleDel(identity, path, method string) bool

Types

type CasbinRule

type CasbinRule struct {
	ID    int    `gorm:"primary_key"`
	Ptype string `gorm:"size:32;uniqueIndex:unique_index"`
	V0    string `gorm:"size:64;uniqueIndex:unique_index"`
	V1    string `gorm:"size:512;uniqueIndex:unique_index"`
	V2    string `gorm:"size:16;uniqueIndex:unique_index"`
	V3    string `gorm:"size:32;uniqueIndex:unique_index"`
	V4    string `gorm:"size:32;uniqueIndex:unique_index"`
	V5    string `gorm:"size:32;uniqueIndex:unique_index"`
}

func RuleGet

func RuleGet() (casbinrule []CasbinRule)

func (CasbinRule) TableName

func (CasbinRule) TableName() string

Jump to

Keyboard shortcuts

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