Documentation ¶
Overview ¶
Package handlers manages the different versions of the API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIMux ¶
func APIMux(cfg APIMuxConfig) *web.App
APIMux constructs an http.Handler with all application routes defined.
func DebugMux ¶
DebugMux registers all the debug standard library routes and then custom debug application routes for the service. This bypassing the use of the DefaultServerMux. Using the DefaultServerMux would be a security risk since a dependency could inject a handler into our service without us knowing it.
func DebugStandardLibraryMux ¶
DebugStandardLibraryMux registers all the debug routes from the standard library into a new mux bypassing the use of the DefaultServerMux. Using the DefaultServerMux would be a security risk since a dependency could inject a handler into our service without us knowing it.
Types ¶
type APIMuxConfig ¶
type APIMuxConfig struct { Shutdown chan os.Signal Log *zap.SugaredLogger Auth *auth.Auth DB *sqlx.DB }
APIMuxConfig contains all the mandatory systems required by handlers.
Directories ¶
Path | Synopsis |
---|---|
debug
|
|
checkgrp
Package checkgrp maintains the group of handlers for health checking (liveliness and rediness probe in k8s).
|
Package checkgrp maintains the group of handlers for health checking (liveliness and rediness probe in k8s). |
v1
|
|
testgrp
Package checkgrp maintains the group of handlers for health checking (liveliness and rediness probe in k8s).
|
Package checkgrp maintains the group of handlers for health checking (liveliness and rediness probe in k8s). |
usergrp
Package usergrp maintains the group of handlers for user access.
|
Package usergrp maintains the group of handlers for user access. |