handlers

package
v0.0.0-...-3ffe671 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package handlers contains the full set of handler functions and routes supported by the web api.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIMux

func APIMux(cfg APIMuxConfig) *web.App

APIMux constructs a http.Handler with all application routes defined.

func DebugMux

func DebugMux(build string, log *zap.SugaredLogger) http.Handler

DebugMux registers all the debug standard library routes and the custom debug application routes for the service. This bypassing the use of the DefaultServiceMux. Using the DefaultServerMux would be a security risk since a dependency could inject a handler into our service without us knowing it.

func DebugStandardLibraryMux

func DebugStandardLibraryMux() *http.ServeMux

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
}

APIMuxConfig contains all the mandatory systems required by handlers.

Directories

Path Synopsis
debug
checkgrp
Package checkgrp maintains the group of handlers for health checking.
Package checkgrp maintains the group of handlers for health checking.
v1

Jump to

Keyboard shortcuts

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