modules

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPModule

func NewHTTPModule(opts ...HTTPOption) fx.Option

NewHTTPModule provides HTTP middleware functionality. It includes server, error handler, health routes, and middleware components.

Options:

  • WithServerConfig: provide static server Config (useful for tests)

Example usage:

// Production - loads config from viper
modules.NewHTTPModule()

// Testing - with static config
modules.NewHTTPModule(
    modules.WithServerConfig(server.Config{...}),
)

Types

type HTTPOption

type HTTPOption func(*httpOptions)

HTTPOption is a functional option for configuring the HTTP module.

func WithServerConfig

func WithServerConfig(cfg server.Config) HTTPOption

WithServerConfig provides a static server Config (useful for tests). When set, the server configuration will not be loaded from viper.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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