Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Port string `env:"PORT,required" envDefault:"1323"`
}
Config includes configuration to initialize an echo server.
type ConfigProvider ¶
ConfigProvider is a plugin that provides Config for initializing echo.
Usage ¶
app.With(&echo.ConfigProvider{})
func (ConfigProvider) Initialize ¶
func (p ConfigProvider) Initialize() error
Initialize loads Config from environment variables and registers it to the application.
type Plugin ¶
type Plugin struct { Middlewares []echo.MiddlewareFunc // will be injected LC sen.Lifecycle `inject:"lifecycle"` Hub sen.Hub `inject:"hub"` Cfg *Config `inject:"echo.config"` }
Plugin is a plugin that provides an instance of echo.Echo. The plugin requires Config is registered in advance.
Usage ¶
app.With(&echo.Plugin{ Middlewares: middlewaresFuncs, })
func (Plugin) Initialize ¶
Initialize initializes and registers the echo.Echo instance with the provided middlewares.
Click to show internal directories.
Click to hide internal directories.