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 ContextKey
- type CustomContext
Constants ¶
This section is empty.
Variables ¶
View Source
var EchoContextKey = &ContextKey{"EchoContextKey"}
EchoContextKey is the context key for the echo.Context
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 ¶ added in v0.5.2
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 ContextKey ¶
type ContextKey struct {
// contains filtered or unexported fields
}
ContextKey is the key name for the additional context
type CustomContext ¶
CustomContext contains the echo.Context and request context.Context
Click to show internal directories.
Click to hide internal directories.