Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CasbinEnforcer *casbin.Enforcer
全局CasbinEnforcer
View Source
var DB *gorm.DB
全局数据库对象
View Source
var Log *zap.SugaredLogger
全局日志变量 var Log *zap.Logger
View Source
var Trans ut.Translator
全局翻译器
View Source
var Validate *validator.Validate
全局Validate数据校验实列
Functions ¶
func ConnSqlite ¶ added in v0.5.6
func InitLogger ¶
func InitLogger()
*
- 初始化日志
- filename 日志文件路径
- level 日志级别
- maxSize 每个日志文件保存的最大尺寸 单位:M
- maxBackups 日志文件最多保存多少个备份
- maxAge 文件最多保存多少天
- compress 是否压缩
- serviceName 服务名
- 由于zap不具备日志切割功能, 这里使用lumberjack配合
Types ¶
type LdapConnPool ¶ added in v0.5.2
type LdapConnPool struct {
// contains filtered or unexported fields
}
func (*LdapConnPool) GetConnection ¶ added in v0.5.2
func (lcp *LdapConnPool) GetConnection() (*ldap.Conn, error)
获取一个 ladp Conn
func (*LdapConnPool) PutConnection ¶ added in v0.5.2
func (lcp *LdapConnPool) PutConnection(conn *ldap.Conn)
Click to show internal directories.
Click to hide internal directories.