Documentation
¶
Index ¶
- func ErrResponseWithLog(ctx echo.Context, logger logger.Logger, err error) error
- func GetConfigPath(configPath string) string
- func GetCtxWithReqID(c echo.Context) (context.Context, context.CancelFunc)
- func GetIPAddress(c echo.Context) string
- func GetRequestCtx(c echo.Context) context.Context
- func GetRequestID(c echo.Context) string
- func LogResponseError(ctx echo.Context, logger logger.Logger, err error)
- func ReadRequest(ctx echo.Context, request interface{}) error
- func ValidateStruct(ctx context.Context, s interface{}) error
- type ReqIDCtxKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrResponseWithLog ¶ added in v1.1.0
Error response with logging error for echo context
func GetConfigPath ¶
func GetCtxWithReqID ¶ added in v1.1.0
Get ctx with timeout and request id from echo context
func GetRequestCtx ¶ added in v1.1.0
Get context with request id
func GetRequestID ¶ added in v1.1.0
Get request id from echo context
func LogResponseError ¶ added in v1.1.0
Error response with logging error for echo context
func ReadRequest ¶ added in v1.1.1
Read request body and validate
func ValidateStruct ¶
Validate struct fields
Types ¶
type ReqIDCtxKey ¶ added in v1.1.0
type ReqIDCtxKey struct{}
ReqIDCtxKey is a key used for the Request ID in context
Click to show internal directories.
Click to hide internal directories.