Documentation
¶
Index ¶
- Constants
- type Controller
- type MiddlewareFunc
- type Module
- type Route
- type Router
- func (router *Router) Connect() error
- func (router *Router) DB() *gorm.DB
- func (router *Router) GetController(requestPath string) *Controller
- func (router *Router) ModelsList() []any
- func (router *Router) ModuleNames() []string
- func (router *Router) NoMiddlewares(w http.ResponseWriter, r *http.Request)
- func (router *Router) ServeHTTP(w http.ResponseWriter, r *http.Request)
Constants ¶
View Source
const (
RouteNotFoundPath = "?404"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Module ¶
type Module struct {
Route
Middlewares []MiddlewareFunc
NotExplict bool
Models []interface{}
}
type Route ¶
type Route map[string]Controller
func (Route) UpdateRouteNotFoundController ¶
func (route Route) UpdateRouteNotFoundController(controller Controller)
type Router ¶
type Router struct {
Modules map[string]Module
Default404 http.Handler
// contains filtered or unexported fields
}
func (*Router) GetController ¶
func (router *Router) GetController(requestPath string) *Controller
func (*Router) ModelsList ¶
func (*Router) ModuleNames ¶
func (*Router) NoMiddlewares ¶
func (router *Router) NoMiddlewares(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.