Documentation
¶
Index ¶
- Variables
- func AuthenticateMiddleware(authenticator authn.Authenticator) echo.MiddlewareFunc
- func GenerateRequestID() string
- func GetAuthResult(c echo.Context) *authn.Result
- func GetRequestID(c echo.Context) string
- func HTTPErrorHandler(logger *slog.Logger) echo.HTTPErrorHandler
- func LoggingMiddleware(logger *slog.Logger) echo.MiddlewareFunc
- func RequestIDMiddleware() echo.MiddlewareFunc
- type Error
- type ErrorCode
- type Handler
- type InternalError
- type Request
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ResponseCodeToErrorCode = map[int]ErrorCode{ http.StatusInternalServerError: ErrorCodeInternal, } )
Functions ¶
func AuthenticateMiddleware ¶
func AuthenticateMiddleware(authenticator authn.Authenticator) echo.MiddlewareFunc
func GenerateRequestID ¶
func GenerateRequestID() string
func GetAuthResult ¶
func GetRequestID ¶
func GetRequestID(c echo.Context) string
func HTTPErrorHandler ¶
func LoggingMiddleware ¶
func RequestIDMiddleware ¶
func RequestIDMiddleware() echo.MiddlewareFunc
Types ¶
type Error ¶
type InternalError ¶
type InternalError struct {
Err error
}
func InternalServerError ¶
func InternalServerError(err error) *InternalError
func (*InternalError) Error ¶
func (e *InternalError) Error() string
func (*InternalError) Unwrap ¶
func (e *InternalError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.