Documentation
¶
Index ¶
- Variables
- type Module
- func (m *Module) Create(baseRouter gonethttproute.RouterWrapper) error
- func (m *Module) GetController() interface{}
- func (m *Module) GetLoadFn() func()
- func (m *Module) GetPath() string
- func (m *Module) GetRouter() gonethttproute.RouterWrapper
- func (m *Module) GetService() interface{}
- func (m *Module) GetSubmodules() *[]ModuleWrapper
- func (m *Module) GetValidator() interface{}
- func (m *Module) Handler() http.Handler
- type ModuleWrapper
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Module ¶
type Module struct {
Path string
Service interface{}
Validator interface{}
Controller interface{}
LoadFn func()
RegisterRoutesFn func()
Submodules []ModuleWrapper
gonethttproute.RouterWrapper
}
Module is the struct for the route module
func (*Module) Create ¶
func (m *Module) Create( baseRouter gonethttproute.RouterWrapper, ) error
Create is a function that creates the router for the controller and its submodules, and loads the module
func (*Module) GetController ¶ added in v0.6.13
func (m *Module) GetController() interface{}
GetController is a function that returns the controller
func (*Module) GetLoadFn ¶ added in v0.6.17
func (m *Module) GetLoadFn() func()
GetLoadFn is a function that returns the load function
func (*Module) GetRouter ¶ added in v0.6.12
func (m *Module) GetRouter() gonethttproute.RouterWrapper
GetRouter returns the router
func (*Module) GetService ¶ added in v0.6.13
func (m *Module) GetService() interface{}
GetService is a function that returns the service
func (*Module) GetSubmodules ¶ added in v0.6.15
func (m *Module) GetSubmodules() *[]ModuleWrapper
GetSubmodules is a function that returns the submodules
func (*Module) GetValidator ¶ added in v0.6.13
func (m *Module) GetValidator() interface{}
GetValidator is a function that returns the validator
type ModuleWrapper ¶
type ModuleWrapper interface {
Create(baseRouter gonethttproute.RouterWrapper) error
GetRouter() gonethttproute.RouterWrapper
Handler() http.Handler
GetService() interface{}
GetValidator() interface{}
GetController() interface{}
GetPath() string
SetLoadFn(loadFn func())
GetLoadFn() func()
SetRegisterRoutesFn(registerRoutesFn func())
GetSubmodules() *[]ModuleWrapper
gonethttproute.RouterWrapper
}
ModuleWrapper is the interface for the route module
Click to show internal directories.
Click to hide internal directories.