echo

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: Apache-2.0, MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func ErrorLogger added in v0.0.18

func ErrorLogger(log logging.EventLogger) echo.MiddlewareFunc

ErrorLogger 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