server

package
v0.0.0-...-80b4c31 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package server assembles the HTTP layer from the modules' route contributions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTP

func HTTP(groups registry.Routes, r chi.Router)

HTTP registers every route contribution on r.

func HealthRoutes

func HealthRoutes(checks registry.HealthChecks) transport.Endpoints

HealthRoutes serves the probes; they stay out of the OpenAPI docs.

func NewHTTP

func NewHTTP(config *conf.Config, router *chi.Mux) *http.Server

func NewRouter

func NewRouter(
	config *conf.Config,
	log *slog.Logger,
	session *sessions.Manager,
	validate *validator.Validator,
	routes registry.Routes,
	version Version,
) (*chi.Mux, error)

func SpecJSON

func SpecJSON(
	title string,
	version Version,
	validate *validator.Validator,
	groups registry.Routes,
) ([]byte, error)

SpecJSON assembles the OpenAPI 3.1 document from every documented endpoint.

func WsRoutes

func WsRoutes() transport.Endpoints

Types

type Version

type Version string

Version is the build version, injected by main; the OpenAPI document carries it.

func NewVersion

func NewVersion(version string) Version

NewVersion converts the build-time injector input to its distinct graph type.

Jump to

Keyboard shortcuts

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