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.