httpapi

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2026 License: MIT Imports: 43 Imported by: 0

README

HTTP application composition

This package assembles and runs the public HTTP API process.

Responsibilities and boundaries

  • Builds infrastructure, repository adapters, usecases, handlers, middleware, and the HTTP server in dependency order.
  • Returns startup failures immediately and closes resources that were already initialized.
  • Contains wiring only; request mapping belongs in delivery and business behavior belongs in usecases or domain code.

Extending

  • Add constructors to the matching httpapi_*_wiring.go file.
  • Put setup shared by multiple executable types in internal/app/runtime.
  • Preserve explicit construction and reverse-order cleanup when adding dependencies.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	*appruntime.Runtime
	Config config.HTTPAPIConfig
	Server *httpDelivery.Server
}

func New

func New(ctx context.Context) (*App, error)

func (*App) Shutdown

func (a *App) Shutdown(ctx context.Context) error

func (*App) Start

func (a *App) Start() error

Jump to

Keyboard shortcuts

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