router

package
v0.2.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2024 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrHandler

func ErrHandler(err error, c echo.Context)

ErrHandler is a custom error handler that will log the error and corresponding message. Use an echo.HTTPError if there is a need to return a status code other than 500. Normal errors will be handled using a 500 and generic internal server error message..

func SetupAuthRouter

func SetupAuthRouter(e RouterGroup)

SetupAuthRouter is a helper function that will register all the auth routes to the RouterGroup.

func SetupBentoRoutes

func SetupBentoRoutes(e RouterGroup)

SetupBentoRoutes setups the routes for bento services.

func SetupHealthcheckRoutes

func SetupHealthcheckRoutes(e RouterGroup)

SetupHealthcheckRoutes set ups all the routes to do healthcheck.

Types

type Ingridient

type Ingridient struct {
	Name  string `` /* 146-byte string literal not displayed */
	Value string `json:"value" validate:"required" errormsg:"Missing ingridient value"`
}

Ingridient is used in the addIngridientsReqBody.

type RouterGroup

type RouterGroup interface {
	GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL