handler

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: BSD-2-Clause Imports: 18 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 handler owns the HTTP surface: the five canonical admin endpoints and the typed /api/v1 read endpoints.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(
	ctx context.Context,
	index *vaultapi.Index,
	gatewaySecret string,
	vaultPath string,
	writer gitrest.Client,
	clock libtime.CurrentDateTime,
) http.Handler

NewHandler builds the service router. When gatewaySecret is non-empty every /api/v1/* request must carry it in X-Gateway-Secret; the admin endpoints stay unauthenticated, matching the fleet's contract.

The write endpoints need three things the read endpoints do not: vaultPath, to read the original bytes before re-rendering them; writer, to hand the rendered file to git-rest; and clock, so an approval's instant is injected rather than read from the wall clock.

Types

This section is empty.

Jump to

Keyboard shortcuts

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