Documentation ¶
Index ¶
- Constants
- func AppId() string
- func AppName() string
- func AppPath() string
- func AssetPath(filename string) string
- func Boot(cfg *Cfg)
- func DefaultLevelEncoder(l zapcore.Level, enc zapcore.PrimitiveArrayEncoder)
- func DefaultTimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)
- func EnsureAbs(path string) string
- func HomeDir() string
- func NewLogger(name string, caller bool) *zap.Logger
- func ZL() *zap.Logger
- type Cfg
- type Gin
- type RGroup
- func (rg *RGroup) AddRolePerm(role string, perms ...string)
- func (rg *RGroup) AddRouterPerms(router string, perms ...string)
- func (rg *RGroup) Bind(method, router string, handler gin.HandlerFunc, perms ...string)
- func (rg *RGroup) ClearAllRolesPerm()
- func (rg *RGroup) ClearRolePerm(role string)
- func (rg *RGroup) MakeOpen(routers ...string)
- func (rg *RGroup) MakeWhite(routers ...string)
- func (rg *RGroup) NewJwt(secret string, expires int64)
- func (rg *RGroup) NewJwtToken(uid int64, roles string) (string, error)
- func (rg *RGroup) Path() string
Constants ¶
View Source
const (
DefaultLogDir = "logs"
)
Variables ¶
This section is empty.
Functions ¶
func DefaultLevelEncoder ¶
func DefaultLevelEncoder(l zapcore.Level, enc zapcore.PrimitiveArrayEncoder)
func DefaultTimeEncoder ¶
func DefaultTimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)
Types ¶
type RGroup ¶
type RGroup struct { Group *gin.RouterGroup // contains filtered or unexported fields }
func (*RGroup) AddRolePerm ¶
func (*RGroup) AddRouterPerms ¶
func (*RGroup) Bind ¶
func (rg *RGroup) Bind(method, router string, handler gin.HandlerFunc, perms ...string)
func (*RGroup) ClearAllRolesPerm ¶
func (rg *RGroup) ClearAllRolesPerm()
func (*RGroup) ClearRolePerm ¶
Click to show internal directories.
Click to hide internal directories.