Documentation ¶
Index ¶
- func Setup(db *gorm.DB, _ string) *casbin.SyncedEnforcer
- type Logger
- func (l *Logger) EnableLog(enable bool)
- func (l *Logger) IsEnabled() bool
- func (l *Logger) LogEnforce(matcher string, request []interface{}, result bool, explains [][]string)
- func (l *Logger) LogError(err error, msg ...string)
- func (l *Logger) LogModel(model [][]string)
- func (l *Logger) LogPolicy(policy map[string][][]string)
- func (l *Logger) LogRole(roles []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is the implementation for a Logger using golang log.
func (*Logger) LogEnforce ¶
func (l *Logger) LogEnforce(matcher string, request []interface{}, result bool, explains [][]string)
LogEnforce log info related to enforce.
Click to show internal directories.
Click to hide internal directories.