casbin

package
v1.31.4 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(db *gorm.DB) *casbin.SyncedEnforcer

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger is the implementation for a Logger using golang log.

func (*Logger) EnableLog

func (l *Logger) EnableLog(enable bool)

EnableLog controls whether print the message.

func (*Logger) IsEnabled

func (l *Logger) IsEnabled() bool

IsEnabled returns if logger is enabled.

func (*Logger) LogEnforce

func (l *Logger) LogEnforce(matcher string, request []interface{}, result bool, explains [][]string)

LogEnforce log info related to enforce.

func (*Logger) LogError added in v1.30.0

func (l *Logger) LogError(err error, msg ...string)

LogError log info related to errors.

func (*Logger) LogModel

func (l *Logger) LogModel(model [][]string)

LogModel log info related to model.

func (*Logger) LogPolicy

func (l *Logger) LogPolicy(policy map[string][][]string)

LogPolicy log info related to policy.

func (*Logger) LogRole

func (l *Logger) LogRole(roles []string)

LogRole log info related to role.

Jump to

Keyboard shortcuts

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