api

package
v0.0.0-...-28185e2 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: GPL-3.0 Imports: 48 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenAPIHandler

func OpenAPIHandler() http.HandlerFunc

func OpenAPIYAMLHandler

func OpenAPIYAMLHandler() http.HandlerFunc

OpenAPIYAMLHandler returns the OpenAPI specification in YAML format. Serves the raw YAML file without conversion.

func VersionHandler

func VersionHandler(version, gitCommit, buildDate string) http.Handler

VersionHandler returns an HTTP handler for the /version endpoint. Returns build metadata including version, git commit, build date, and Go version. This is a public endpoint (no authentication required).

Parameters are typically set via ldflags during build (see Dockerfile):

  • version: Application version (e.g., "0.1.0" or "dev")
  • gitCommit: Git commit hash (e.g., "abc123def456" or "unknown")
  • buildDate: Build timestamp (e.g., "2026-01-28T12:00:00Z" or "unknown")

Types

type RouterWithClient

type RouterWithClient struct {
	Handler       http.Handler
	RiverClient   *river.Client[pgx.Tx]
	UsageRecorder *developers.UsageRecorder
	Broker        *sse.Broker
}

RouterWithClient bundles the HTTP handler with the River client for graceful shutdown.

func NewRouter

func NewRouter(cfg config.Config, logger zerolog.Logger, pool *pgxpool.Pool, version, gitCommit, buildDate string, shutdownCtx ...context.Context) *RouterWithClient

Directories

Path Synopsis
Package pagination provides cursor-based pagination for SEL API endpoints.
Package pagination provides cursor-based pagination for SEL API endpoints.

Jump to

Keyboard shortcuts

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