security

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 {
	types.Component

	Model map[string]string `value:"casbin.model"`
	Log   log.Logger        `wire:""`
	// contains filtered or unexported fields
}

func NewStarter added in v1.3.6

func NewStarter() *Casbin

func (*Casbin) DataSource added in v1.4.4

func (r *Casbin) DataSource() string

func (Casbin) GetEnforcer

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

func (*Casbin) Init added in v1.4.4

func (r *Casbin) Init() error

func (*Casbin) SetDB added in v1.4.4

func (r *Casbin) SetDB(db datasource.DB)

Jump to

Keyboard shortcuts

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