ingest

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package ingest is the receive path: POST /in/{source}.

The contract is persist-first and honest about failure:

  • the raw body and headers are written before anything else happens;
  • a failed signature check is still persisted (verify_status=rejected, response 401) so the evidence survives for debugging;
  • if the database write fails the response is 500 — never a fake 200 that would tell the provider its event is safe when it is not;
  • an oversized body is the one deliberate exception: 413, not stored.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Store     *store.Store
	Cfg       *config.Config
	Verifiers map[string]verify.Verifier // by source name; nil entry = unverified source
	Log       *slog.Logger
}

func (*Handler) Register

func (h *Handler) Register(mux *http.ServeMux)

Register mounts the ingest route on mux.

Jump to

Keyboard shortcuts

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