Documentation ¶
Overview ¶
Package context extends the default echo.Context.
All functions return our standard xerror.Error in case of error.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { echo.Context // contains filtered or unexported fields }
Context extends the default echo.Context.
func MustCastFromEchoContext ¶
func MustCastFromEchoContext(c echo.Context) Context
MustCastFromEchoContext cast an echo.Context to our custom Context.
It panics if casting goes wrong.
func (Context) HasResource ¶
HasResource returns true if the Context has a resource.Resource.
func (Context) LogRequestResult ¶
LogRequestResult logs the result of a request. This method should only be used by a middleware!
If an error is given, returns the exact same error.
func (Context) MustResource ¶
MustResource returns the resource.Resource associated with the Context.
It panics if no resource.Resource.
func (*Context) WithResource ¶
WithResource creates a resource.Resource and adds it to the Context.