echo

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2025 License: Apache-2.0, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func ErrorHandler added in v0.0.13

func ErrorHandler(log logging.EventLogger) echo.MiddlewareFunc

ErrorHandler is a middleware that logs errors to the provided logger.

func NewEcho

func NewEcho() *echo.Echo

NewEcho creates a new Echo instance with default middleware

func RegisterRoutes

func RegisterRoutes(e *echo.Echo, params RouteParams)

RegisterRoutes registers all routes from collected registrars

Types

type EchoServer

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

EchoServer wraps Echo with fx lifecycle management

func StartEchoServer added in v0.0.13

func StartEchoServer(cfg app.AppConfig, e *echo.Echo, lc fx.Lifecycle) (*EchoServer, error)

StartEchoServer runs a Echo server with lifecycle management

func (*EchoServer) Address

func (s *EchoServer) Address() string

Address returns the server's listening address

type RouteParams

type RouteParams struct {
	fx.In

	Registrars []RouteRegistrar `group:"route_registrar"`
}

RouteParams collects all route registrars

type RouteRegistrar

type RouteRegistrar interface {
	RegisterRoutes(e *echo.Echo)
}

RouteRegistrar defines the interface for services that register Echo routes

Jump to

Keyboard shortcuts

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