Documentation
¶
Index ¶
- func AddCtxLoggers(logger *zap.Logger) gin.HandlerFunc
- func CreateCoreEngine(logger *zap.Logger) *gin.Engine
- func CreateTestContext() (*gin.Context, *gin.Engine)
- func CtxLog(ctx *gin.Context) *zap.Logger
- func CtxLogS(ctx *gin.Context) *zap.SugaredLogger
- type StatMap
- func (s StatMap) FetchAll() (map[string]any, error)
- func (s StatMap) Int64(name string) (int64, error)
- func (s StatMap) MapInt64(name string) (map[string]int64, error)
- func (s StatMap) SetInt64(name string, val int64) error
- func (s StatMap) SetMapInt64(name string, val map[string]int64) error
- func (s StatMap) StorageId() string
- func (s StatMap) StoragePrefix() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCtxLoggers ¶
func AddCtxLoggers(logger *zap.Logger) gin.HandlerFunc
AddCtxLoggers middleware makes the logger available to handlers.
Both sugared and non-sugared versions are available.
func CreateCoreEngine ¶
CreateCoreEngine returns a gin router with zap logging and recovery
func CreateTestContext ¶
CreateTestContext returns a gin Context and engine for testing.
Unlike a raw Gin-prepared test context, this one has a request.
Types ¶
Click to show internal directories.
Click to hide internal directories.