Documentation ¶
Overview ¶
Package echocontext adds the echo context to the parent context
Index ¶
- Variables
- func EchoContextFromContext(ctx context.Context) (echo.Context, error)
- func EchoContextToContextMiddleware() echo.MiddlewareFunc
- func NewTestContext() context.Context
- func NewTestContextWithValidUser(subject string) (*echo.Context, error)
- func NewTestEchoContext() echo.Context
- type CustomContext
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUnableToRetrieveEchoContext is returned when the echo context is unable to be parsed from parent context ErrUnableToRetrieveEchoContext = errors.New("unable to retrieve echo context") )
Functions ¶
func EchoContextFromContext ¶
EchoContextFromContext gets the echo.Context from the parent context
func EchoContextToContextMiddleware ¶
func EchoContextToContextMiddleware() echo.MiddlewareFunc
EchoContextToContextMiddleware is the middleware that adds the echo.Context to the parent context
func NewTestContext ¶
func NewTestContextWithValidUser ¶
NewTestContextWithValidUser creates an echo context with a fake subject for testing purposes ONLY
func NewTestEchoContext ¶
NewTestEchoContext used for testing purposes ONLY
Types ¶
type CustomContext ¶
CustomContext contains the echo.Context and request context.Context
Click to show internal directories.
Click to hide internal directories.