casbin

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnforcer

func GetEnforcer() *casbin.SyncedEnforcer

func GetTableName

func GetTableName() string

func New

func New(conf ...string) *casbin.SyncedEnforcer

Types

type TableCasbinRule

type TableCasbinRule struct {
	ID    uint   `gorm:"primaryKey;autoIncrement"`
	Ptype string `gorm:"size:64;uniqueIndex:unique_index"`
	V0    string `gorm:"size:64;uniqueIndex:unique_index"` // user
	V1    string `gorm:"size:64;uniqueIndex:unique_index"` // role
	V2    string `gorm:"size:64;uniqueIndex:unique_index"` // domain
	V3    string `gorm:"size:64;uniqueIndex:unique_index"`
	V4    string `gorm:"size:64;uniqueIndex:unique_index"`
	V5    string `gorm:"size:64;uniqueIndex:unique_index"`
}

Jump to

Keyboard shortcuts

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