Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// Container provides route handlers with access to all services.
Container *services.Container
}
Controller stores the Container, providing the route handlers with access to all necessary dependencies.
func NewController ¶
func NewController(c *services.Container) Controller
NewController creates a new Controller.
func (*Controller) Redirect ¶
func (c *Controller) Redirect(ctx echo.Context, route string, routeParams ...interface{}) error
func (*Controller) RenderErrorResponse ¶
func (c *Controller) RenderErrorResponse(ctx echo.Context, status int, err error, msg string) error
func (*Controller) RenderJSONResponse ¶
func (c *Controller) RenderJSONResponse(ctx echo.Context, resp JSONResponse) error
type JSONResponse ¶
type JSONResponse struct {
StatusCode int
Headers map[string]string
RequestID string
Path string
URL string
Context echo.Context
ToURL func(name string, params ...interface{}) string
Body interface{}
}
func NewJSONResponse ¶
func NewJSONResponse(ctx echo.Context) JSONResponse
Click to show internal directories.
Click to hide internal directories.