Documentation ¶
Index ¶
- type ModuleConfig
- type Router
- type Routes
- func (r *Routes) AddFromRoutes(routes *Routes)
- func (r *Routes) Delete(name string, path string, handler http.HandlerFunc)
- func (r *Routes) Get(name string, path string, handler http.HandlerFunc)
- func (r *Routes) GetRoutesInfo() []application.RouteInfo
- func (r *Routes) Options(name string, path string, handler http.HandlerFunc)
- func (r *Routes) Post(name string, path string, handler http.HandlerFunc)
- func (r *Routes) Put(name string, path string, handler http.HandlerFunc)
- type ServiceProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ModuleConfig ¶
type ModuleConfig struct { Routes Routes Port int RedirectTrailingSlash bool RedirectFixedPath bool HandleMethodNotAllowed bool HandleOPTIONS bool GlobalOPTIONS http.Handler NotFound http.Handler MethodNotAllowed http.Handler PanicHandler func(http.ResponseWriter, *http.Request, interface{}) // contains filtered or unexported fields }
func NewModuleConfig ¶
func NewModuleConfig() *ModuleConfig
func (*ModuleConfig) InitConfig ¶
func (c *ModuleConfig) InitConfig(config application.Config) error
func (*ModuleConfig) OnStart ¶
func (c *ModuleConfig) OnStart() error
func (*ModuleConfig) ProvidedServices ¶
func (c *ModuleConfig) ProvidedServices() []interface{}
func (*ModuleConfig) SetContainer ¶
func (c *ModuleConfig) SetContainer(container *dig.Container)
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func NewRouter ¶
func NewRouter(config *ModuleConfig, logger application.Logger) *Router
func (*Router) AddRoutes ¶
func (r *Router) AddRoutes(routes []application.RouteInfo)
type Routes ¶
type Routes struct {
// contains filtered or unexported fields
}
func (*Routes) AddFromRoutes ¶
func (*Routes) GetRoutesInfo ¶
func (r *Routes) GetRoutesInfo() []application.RouteInfo
type ServiceProvider ¶
type ServiceProvider struct {
// contains filtered or unexported fields
}
func NewServiceProvider ¶
func NewServiceProvider(config *ModuleConfig) *ServiceProvider
func (*ServiceProvider) InitConfig ¶
func (s *ServiceProvider) InitConfig(config application.Config) error
func (*ServiceProvider) OnClose ¶
func (s *ServiceProvider) OnClose() error
func (*ServiceProvider) OnStart ¶
func (s *ServiceProvider) OnStart() error
func (*ServiceProvider) Provide ¶
func (s *ServiceProvider) Provide() []interface{}
func (*ServiceProvider) SetContainer ¶
func (s *ServiceProvider) SetContainer(container *dig.Container)
Click to show internal directories.
Click to hide internal directories.