handlers

package
v0.0.0-...-491cd9a Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DebugMux

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

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 PrivateMux

func PrivateMux(cfg MuxConfig) http.Handler

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

func PublicMux

func PublicMux(cfg MuxConfig) http.Handler

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

Types

type MuxConfig

type MuxConfig struct {
	Shutdown chan os.Signal
	Log      *zap.SugaredLogger
}

MuxConfig contains all the mandatory systems required by handlers.

Directories

Path Synopsis
debug
v1

Jump to

Keyboard shortcuts

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