Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoContext ¶
func NewGoContext ¶
type ParamContext ¶
type ParamContext interface {
// Get retrieves data from the context.
Get(key string) interface{}
// Set saves data in the context.
Set(key string, val interface{})
// Param returns path parameter by name.
Param(name string) string
// ParamNames returns path parameter names.
ParamNames() []string
// ParamValues returns path parameter values.
ParamValues() []string
}
ParamContext represents a subset of echo.Context to make testing easier
type RequestContext ¶
type RequestContext struct {
echo.Context
}
RequestContext wraps echo.Context but Get and Set set values on the request context, rather than the echo context. This is necessary when we use the oapi-gen StrictServerInterface, since the implemented methods are passed a request context, not an echo context. Thus, our middleware needs to write to the request context as well.
func NewRequestContext ¶
func NewRequestContext(ctx echo.Context) *RequestContext
func (*RequestContext) Get ¶
func (e *RequestContext) Get(key string) interface{}
func (*RequestContext) Set ¶
func (e *RequestContext) Set(key string, val interface{})
Click to show internal directories.
Click to hide internal directories.