security

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const CasbinDatasource = "casbin_datasource"

Variables

This section is empty.

Functions

func InitDatabase

func InitDatabase(m map[string]string, db *gorm.DB) (*casbin.Enforcer, error)

Types

type Casbin

type Casbin struct {
	bean.Component

	DB    *gorm.DB          `db:"auth_datasource"`
	Model map[string]string `value:"casbin.model"`
	Log   logging.Logger    `bean:"log"`
	// contains filtered or unexported fields
}

func (*Casbin) AfterInit

func (r *Casbin) AfterInit()

func (Casbin) GetEnforcer

func (r Casbin) GetEnforcer() *casbin.Enforcer

func (*Casbin) Repository

func (r *Casbin) Repository() string

Jump to

Keyboard shortcuts

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