Documentation ¶
Overview ¶
Package routes : manage the echo route
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Module("routes", fx.Provide( NewEcho, ), fx.Invoke(decorators...), fx.Invoke(fx.Annotate( NewHTTPServer, fx.OnStart(startHook), fx.OnStop(stopHook), )), )
Module routes module, it provides a new echo instance and adds all the routes to it and starts the server in fx.Lifecycle
Functions ¶
func AddRouters ¶
func AddRouters(param AddRoutersParam) *echo.Echo
AddRouters adds all the routes to echo
Types ¶
type AddRoutersParam ¶
type AddRoutersParam struct { fx.In PublicApis []*api.API `group:"public"` OptionalApis []*api.API `group:"optional"` PrivateApis []*api.API `group:"private"` E *echo.Echo Signer *logic.JWTSigner Config *config.Config }
AddRoutersParam is the param for AddRouters
type CustomBinder ¶
type CustomBinder struct {
// contains filtered or unexported fields
}
CustomBinder is a custom binder to bind request body to struct
func NewCustomBinder ¶
func NewCustomBinder() *CustomBinder
NewCustomBinder returns a new CustomBinder
func (*CustomBinder) Bind ¶
func (b *CustomBinder) Bind(v any, c echo.Context) error
Bind implements echo.Binder interface
Click to show internal directories.
Click to hide internal directories.