handlers

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package handlers provides HTTP server setup and routing functionality. It includes server initialization, middleware configuration, and route registration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(address string, logger *logger.Logger, db *database.Database, cache *cache.Cache, tm *middleware.TelemetryConfig) (*Server, error)

func (*Server) ListenAndServe

func (srv *Server) ListenAndServe() error

ListenAndServe starts the HTTP server and listens for incoming requests. It returns an error if the server fails to start.

func (*Server) ServerDown

func (srv *Server) ServerDown(ctx context.Context) error

ServerDown gracefully shuts down the HTTP server. It takes a context.Context argument to allow for cancellation of the shutdown process.

Directories

Path Synopsis
Package category provides HTTP handlers for category-related operations.
Package category provides HTTP handlers for category-related operations.
model
Package model provides data structures for category-related operations.
Package model provides data structures for category-related operations.
Package health provides HTTP handlers for health check operations.
Package health provides HTTP handlers for health check operations.
Package product provides HTTP handlers for product-related operations.
Package product provides HTTP handlers for product-related operations.
model
Package model provides data structures for product-related operations.
Package model provides data structures for product-related operations.

Jump to

Keyboard shortcuts

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