http

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HttpModule = fx.Module("liquor-app-http-server", fx.Provide(
	instanceServer,
),
	fx.Invoke(
		startServer,
		initialRoute,
	))

Functions

func NewRestModule added in v1.5.0

func NewRestModule(name string, route any, providers ...any) fx.Option

NewRestModule creates a new REST module with handler and route registration.

Parameters:

  • name: Module name identifier
  • providers: Handlers and middlewares to be provided
  • route: Route registration function

Returns:

  • fx.Option: Fx module option for dependency injection

Example:

NewRestModule(
    "users",
    NewUserHandler,
    RegisterUserRoutes,
)

Types

This section is empty.

Jump to

Keyboard shortcuts

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