router

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package router builds the service's HTTP surface on chi, in the order and with the semantics the fiber app had. scripts/e2e-golden is the contract.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(d Deps) http.Handler

New builds the router. The middleware order below is the order the fiber app registered things in, and it is behaviour, not style: which requests the rate limiters count, which get CORS headers, which are metered and which need a token all follow from it.

Types

type Deps

type Deps struct {
	Image   handler.Image
	AWS     handler.AwsHandler
	Minio   handler.MinioHandler
	WS      handler.WebSocketHandler
	Archive handler.ArchiveHandler
	Health  *handler.HealthChecker

	GlobalLimiter func(http.Handler) http.Handler
	UploadLimiter func(http.Handler) http.Handler // unused when DisableUpload

	DisableGet, DisableUpload, DisableDelete bool
	FaviconFile                              string
}

Deps is what New wires together.

Jump to

Keyboard shortcuts

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