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) 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) EnableLog ¶
EnableLog controls whether print the message.
func (*Logger) IsEnabled ¶
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) LogModel ¶
LogModel log info related to model.
func (*Logger) LogPolicy ¶
LogPolicy log info related to policy.
Click to show internal directories.
Click to hide internal directories.