Documentation
¶
Index ¶
Constants ¶
View Source
const HeaderVersion = "X-Gopos-Version"
HeaderVersion HTTP Header that includes the current version.
Variables ¶
This section is empty.
Functions ¶
func ContextMiddleware ¶
ContextMiddleware provides the GoposContext as a middleware function.
func ParseAndValidate ¶
func ParseAndValidate(ctx *echo.Context, target interface{}) error
ParseAndValidate parses the request and applies data validation.
func PrometheusMiddleware ¶
func PrometheusMiddleware(srv *echo.Echo)
PrometheusMiddleware registers the Prometheus middleware on the server.
func VersionHeaderMiddleware ¶
func VersionHeaderMiddleware(next echo.HandlerFunc) echo.HandlerFunc
VersionHeaderMiddleware adds the current Gopos version to every HTTP response.
Types ¶
type GoposContext ¶
GoposContext custom context that exposes the database instance to routes.
Click to show internal directories.
Click to hide internal directories.