web

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package web provides the web server setup and HTTP utilities.

Package web provides web server setup and HTTP utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(p ClientParams) *client.Client

NewClient creates a new API client

func NewMux

func NewMux(UIHandler http.Handler, APIHandlers http.Handler) *http.ServeMux

NewMux creates the main HTTP ServeMux.

func NewServer

func NewServer(mux *http.ServeMux) *http.Server

NewServer creates the main HTTP server instance.

func RegisterWebServerHooks

func RegisterWebServerHooks(lifecycle fx.Lifecycle, httpServer *http.Server, logger log.Logger)

RegisterWebServerHooks registers the OnStart and OnStop hooks for the HTTP server.

Types

type ClientParams

type ClientParams struct {
	fx.In

	Config config.ClientConfig
	Logger log.Logger
}

ClientParams contains the parameters needed for client creation

type RouteParams

type RouteParams = server.RouteParams

RouteParams aliases server.RouteParams for backward compatibility

Directories

Path Synopsis
Package client provides HTTP client functionality for API interactions.
Package client provides HTTP client functionality for API interactions.
Package config provides configuration structures for the web server.
Package config provides configuration structures for the web server.
Package handlers provides API endpoints and HTTP request handlers.
Package handlers provides API endpoints and HTTP request handlers.
Package middleware provides HTTP middleware components for the web server.
Package middleware provides HTTP middleware components for the web server.
Package server provides HTTP server setup and lifecycle management.
Package server provides HTTP server setup and lifecycle management.

Jump to

Keyboard shortcuts

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