Documentation
¶
Index ¶
- func CreateLogMiddleware() echo.MiddlewareFunc
- func ExceptionMiddleware(next echo.HandlerFunc) echo.HandlerFunc
- func GetBodyMap(c echo.Context) (map[string]interface{}, error)
- func LoadEnv(s interface{})
- func RecoverMiddleware(next echo.HandlerFunc) echo.HandlerFunc
- type ApiResponse
- type ApiResponseError
- type CustomValidator
- type EchoZLogger
- func (e EchoZLogger) Debug(i ...interface{})
- func (e EchoZLogger) Debugf(format string, args ...interface{})
- func (e EchoZLogger) Debugj(j log.JSON)
- func (e EchoZLogger) Error(i ...interface{})
- func (e EchoZLogger) Errorf(format string, args ...interface{})
- func (e EchoZLogger) Errorj(j log.JSON)
- func (e EchoZLogger) Fatal(i ...interface{})
- func (e EchoZLogger) Fatalf(format string, args ...interface{})
- func (e EchoZLogger) Fatalj(j log.JSON)
- func (e EchoZLogger) GetZLogger() *zerolog.Logger
- func (e EchoZLogger) Info(i ...interface{})
- func (e EchoZLogger) Infof(format string, args ...interface{})
- func (e EchoZLogger) Infoj(j log.JSON)
- func (e EchoZLogger) Level() log.Lvl
- func (e EchoZLogger) Output() io.Writer
- func (e EchoZLogger) Panic(i ...interface{})
- func (e EchoZLogger) Panicf(format string, args ...interface{})
- func (e EchoZLogger) Panicj(j log.JSON)
- func (e EchoZLogger) Prefix() string
- func (e EchoZLogger) Print(i ...interface{})
- func (e EchoZLogger) Printf(format string, args ...interface{})
- func (e EchoZLogger) Printj(j log.JSON)
- func (e EchoZLogger) SetHeader(h string)
- func (e EchoZLogger) SetLevel(v log.Lvl)
- func (e EchoZLogger) SetOutput(w io.Writer)
- func (e EchoZLogger) SetPrefix(p string)
- func (e EchoZLogger) Warn(i ...interface{})
- func (e EchoZLogger) Warnf(format string, args ...interface{})
- func (e EchoZLogger) Warnj(j log.JSON)
- type Env
- type Error
- func NewBadRequestError(err error, message string, errCode int) *Error
- func NewForbiddenError(err error, message string, errCode int) *Error
- func NewInternalServerError(err error, message string, errCode int) *Error
- func NewNotFoundError(err error, message string, errCode int) *Error
- func NewUnauthorizedError(err error, message string, errCode int) *Error
- type HttpClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateLogMiddleware ¶
func CreateLogMiddleware() echo.MiddlewareFunc
func ExceptionMiddleware ¶
func ExceptionMiddleware(next echo.HandlerFunc) echo.HandlerFunc
func RecoverMiddleware ¶
func RecoverMiddleware(next echo.HandlerFunc) echo.HandlerFunc
Types ¶
type ApiResponse ¶
type ApiResponse struct {
Success bool `json:"success"`
Data interface{} `json:"data"`
Error *ApiResponseError `json:"error"`
}
func NewErrorResponse ¶
func NewErrorResponse(err error, message string, code int) *ApiResponse
func NewSuccessResponse ¶
func NewSuccessResponse(data interface{}) *ApiResponse
type ApiResponseError ¶
type CustomValidator ¶
type CustomValidator struct {
// contains filtered or unexported fields
}
func NewValidator ¶
func NewValidator() *CustomValidator
func (*CustomValidator) Validate ¶
func (cv *CustomValidator) Validate(i interface{}) error
type EchoZLogger ¶
type EchoZLogger struct {
// contains filtered or unexported fields
}
func NewEchoZLogger ¶
func NewEchoZLogger(zLogger *zerolog.Logger) EchoZLogger
func (EchoZLogger) Debug ¶
func (e EchoZLogger) Debug(i ...interface{})
func (EchoZLogger) Debugf ¶
func (e EchoZLogger) Debugf(format string, args ...interface{})
func (EchoZLogger) Debugj ¶
func (e EchoZLogger) Debugj(j log.JSON)
func (EchoZLogger) Error ¶
func (e EchoZLogger) Error(i ...interface{})
func (EchoZLogger) Errorf ¶
func (e EchoZLogger) Errorf(format string, args ...interface{})
func (EchoZLogger) Errorj ¶
func (e EchoZLogger) Errorj(j log.JSON)
func (EchoZLogger) Fatal ¶
func (e EchoZLogger) Fatal(i ...interface{})
func (EchoZLogger) Fatalf ¶
func (e EchoZLogger) Fatalf(format string, args ...interface{})
func (EchoZLogger) Fatalj ¶
func (e EchoZLogger) Fatalj(j log.JSON)
func (EchoZLogger) GetZLogger ¶
func (e EchoZLogger) GetZLogger() *zerolog.Logger
func (EchoZLogger) Info ¶
func (e EchoZLogger) Info(i ...interface{})
func (EchoZLogger) Infof ¶
func (e EchoZLogger) Infof(format string, args ...interface{})
func (EchoZLogger) Infoj ¶
func (e EchoZLogger) Infoj(j log.JSON)
func (EchoZLogger) Level ¶
func (e EchoZLogger) Level() log.Lvl
func (EchoZLogger) Output ¶
func (e EchoZLogger) Output() io.Writer
func (EchoZLogger) Panic ¶
func (e EchoZLogger) Panic(i ...interface{})
func (EchoZLogger) Panicf ¶
func (e EchoZLogger) Panicf(format string, args ...interface{})
func (EchoZLogger) Panicj ¶
func (e EchoZLogger) Panicj(j log.JSON)
func (EchoZLogger) Prefix ¶
func (e EchoZLogger) Prefix() string
func (EchoZLogger) Print ¶
func (e EchoZLogger) Print(i ...interface{})
func (EchoZLogger) Printf ¶
func (e EchoZLogger) Printf(format string, args ...interface{})
func (EchoZLogger) Printj ¶
func (e EchoZLogger) Printj(j log.JSON)
func (EchoZLogger) SetHeader ¶
func (e EchoZLogger) SetHeader(h string)
func (EchoZLogger) SetLevel ¶
func (e EchoZLogger) SetLevel(v log.Lvl)
func (EchoZLogger) SetOutput ¶
func (e EchoZLogger) SetOutput(w io.Writer)
func (EchoZLogger) SetPrefix ¶
func (e EchoZLogger) SetPrefix(p string)
func (EchoZLogger) Warn ¶
func (e EchoZLogger) Warn(i ...interface{})
func (EchoZLogger) Warnf ¶
func (e EchoZLogger) Warnf(format string, args ...interface{})
func (EchoZLogger) Warnj ¶
func (e EchoZLogger) Warnj(j log.JSON)
type Env ¶
func (*Env) GetEnvAsStrings ¶
Click to show internal directories.
Click to hide internal directories.