httpserver

package
v0.0.0-...-7b5971a Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorHandlingMiddleware

func ErrorHandlingMiddleware() echo.MiddlewareFunc

func HandleError

func HandleError(c echo.Context, err error) error

func HandleInternalError

func HandleInternalError(c echo.Context, message string, cause error) error

func HandleNotFoundError

func HandleNotFoundError(c echo.Context, message string) error

func HandleValidationError

func HandleValidationError(c echo.Context, message string) error

func WrapHTTPError

func WrapHTTPError(httpErr *echo.HTTPError) *apperrors.Error

Types

type HealthCheck

type HealthCheck struct {
	Name  string
	Check func(ctx context.Context) error
}

HealthCheck is a named health check function.

type Server

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

func NewServer

func NewServer(cfg *config.Config, app appService, presence twitch.ViewerPresence, websocketHandler http.Handler, webhookHandler http.Handler, twitchService domain.EventSubService, healthChecks []HealthCheck, httpMetrics *metrics.HTTPMetrics, metricsHandler http.Handler) (*Server, error)

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

func (*Server) Start

func (s *Server) Start() error

Jump to

Keyboard shortcuts

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