routers

package
v0.0.0-...-63972f7 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProtectedRouter

type ProtectedRouter struct {
	Echo             *echo.Echo
	Name             string
	ServiceComponent *services.ServiceComponent
}

ProtectedRouter manages the public API router and its dependencies.

func InitProtectedAPIRouter

func InitProtectedAPIRouter(env *config.SEnv, services *services.ServiceComponent) *ProtectedRouter

func (*ProtectedRouter) Init

func (r *ProtectedRouter) Init()

Init initializes the Echo instance for the router.

func (*ProtectedRouter) Start

func (r *ProtectedRouter) Start(host string, port string)

Start the Echo server

type PublicRouter

type PublicRouter struct {
	Echo              *echo.Echo
	Name              string
	ServiceComponent  *services.ServiceComponent
	RouteTableMapping map[string]string
}

PublicRouter manages the public API router and its dependencies.

func NewPublicRouter

func NewPublicRouter(env *config.SEnv, services *services.ServiceComponent) *PublicRouter

NewPublicRouter creates and initializes a new PublicRouter instance.

func (*PublicRouter) Start

func (r *PublicRouter) Start(host, port string)

Start runs the Echo server and handles graceful shutdown.

type Router

type Router struct {
	Echo *echo.Echo
	Name string
}

Router echo

func (*Router) Init

func (r *Router) Init()

Init init func

func (*Router) RegisterMiddleware

func (r *Router) RegisterMiddleware(middleware echo.MiddlewareFunc)

RegisterMiddleware registers midlleware

func (*Router) RegisterPreMiddleware

func (r *Router) RegisterPreMiddleware(middleware echo.MiddlewareFunc)

RegisterPreMiddleware registers pre middleware

func (*Router) Start

func (r *Router) Start(host string, port string)

Start starts router

Jump to

Keyboard shortcuts

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