Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRootRouter ¶ added in v2.4.4
func NewRootRouter(settings RouterSetting) (model.Router, error)
NewRootRouter creates and inits root http router.
Types ¶
type Router ¶
type Router struct { APIRouter model.Router ManagementRouter model.Router LoginAppRouter model.Router AdminRouter model.Router AdminPanelRouter model.Router RootRouter *http.ServeMux UpdateCORS func() }
Router is a root router to handle REST API, web, and admin requests.
type RouterSetting ¶
type RouterSetting struct { Server model.Server Logger *log.Logger ServeAdminPanel bool Host *url.URL LoggerSettings model.LoggerSettings AppOriginChecker model.OriginChecker APICors *cors.Cors RestartChan chan<- bool Locale string }
RouterSetting contains settings for root http router.
Click to show internal directories.
Click to hide internal directories.