Documentation
¶
Index ¶
- Variables
- func Cors() gin.HandlerFunc
- func ErrHandler() gin.HandlerFunc
- func GinLogger() gin.HandlerFunc
- func HandleNotFound(c *gin.Context)
- func LoadTls() gin.HandlerFunc
- type GormLogger
- func (g *GormLogger) Error(ctx context.Context, message string, data ...interface{})
- func (g *GormLogger) Info(ctx context.Context, message string, data ...interface{})
- func (g *GormLogger) LogMode(level glogger.LogLevel) glogger.Interface
- func (g *GormLogger) Printf(message string, data ...interface{})
- func (g *GormLogger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)
- func (g *GormLogger) Warn(ctx context.Context, message string, data ...interface{})
- type JoyError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( JoySuccess = NewJoyError(http.StatusOK, global.SUCCESS, "success") JoyServerError = NewJoyError(http.StatusInternalServerError, global.ServiceError, "系统异常,请稍后重试!") JoyNotFound = NewJoyError(http.StatusNotFound, global.NotFound, http.StatusText(http.StatusNotFound)) )
Functions ¶
func ErrHandler ¶
func ErrHandler() gin.HandlerFunc
func LoadTls ¶
func LoadTls() gin.HandlerFunc
Types ¶
type GormLogger ¶
type GormLogger struct {
SlowThreshold time.Duration
Colorful bool
LogLevel glogger.LogLevel
// contains filtered or unexported fields
}
func (*GormLogger) Error ¶
func (g *GormLogger) Error(ctx context.Context, message string, data ...interface{})
func (*GormLogger) Info ¶
func (g *GormLogger) Info(ctx context.Context, message string, data ...interface{})
func (*GormLogger) Printf ¶
func (g *GormLogger) Printf(message string, data ...interface{})
Click to show internal directories.
Click to hide internal directories.