Documentation ¶
Index ¶
- Constants
- Variables
- type AnswerAPIRouter
- func (a *AnswerAPIRouter) RegisterAnswerAPIRouter(r *gin.RouterGroup)
- func (a *AnswerAPIRouter) RegisterAnswerAdminAPIRouter(r *gin.RouterGroup)
- func (a *AnswerAPIRouter) RegisterAuthUserWithAnyStatusAnswerAPIRouter(r *gin.RouterGroup)
- func (a *AnswerAPIRouter) RegisterMustUnAuthAnswerAPIRouter(authUserMiddleware *middleware.AuthUserMiddleware, r *gin.RouterGroup)
- func (a *AnswerAPIRouter) RegisterUnAuthAnswerAPIRouter(r *gin.RouterGroup)
- type PluginAPIRouter
- type StaticRouter
- type SwaggerConfig
- type SwaggerRouter
- type TemplateRouter
- type UIRouter
Constants ¶
View Source
const UIIndexFilePath = "build/index.html"
View Source
const UIRootFilePath = "build"
View Source
const UIStaticPath = "build/static"
Variables ¶
View Source
var ProviderSetRouter = wire.NewSet( NewAnswerAPIRouter, NewSwaggerRouter, NewStaticRouter, NewUIRouter, NewTemplateRouter, NewPluginAPIRouter, )
ProviderSetRouter is providers.
Functions ¶
This section is empty.
Types ¶
type AnswerAPIRouter ¶
type AnswerAPIRouter struct {
// contains filtered or unexported fields
}
func NewAnswerAPIRouter ¶
func NewAnswerAPIRouter( langController *controller.LangController, userController *controller.UserController, commentController *controller.CommentController, reportController *controller.ReportController, voteController *controller.VoteController, tagController *controller.TagController, followController *controller.FollowController, collectionController *controller.CollectionController, questionController *controller.QuestionController, answerController *controller.AnswerController, searchController *controller.SearchController, revisionController *controller.RevisionController, rankController *controller.RankController, adminUserController *controller_admin.UserAdminController, reasonController *controller.ReasonController, themeController *controller_admin.ThemeController, adminSiteInfoController *controller_admin.SiteInfoController, siteInfoController *controller.SiteInfoController, notificationController *controller.NotificationController, dashboardController *controller.DashboardController, uploadController *controller.UploadController, activityController *controller.ActivityController, roleController *controller_admin.RoleController, pluginController *controller_admin.PluginController, permissionController *controller.PermissionController, userPluginController *controller.UserPluginController, reviewController *controller.ReviewController, metaController *controller.MetaController, ) *AnswerAPIRouter
func (*AnswerAPIRouter) RegisterAnswerAPIRouter ¶
func (a *AnswerAPIRouter) RegisterAnswerAPIRouter(r *gin.RouterGroup)
func (*AnswerAPIRouter) RegisterAnswerAdminAPIRouter ¶
func (a *AnswerAPIRouter) RegisterAnswerAdminAPIRouter(r *gin.RouterGroup)
func (*AnswerAPIRouter) RegisterAuthUserWithAnyStatusAnswerAPIRouter ¶ added in v1.2.5
func (a *AnswerAPIRouter) RegisterAuthUserWithAnyStatusAnswerAPIRouter(r *gin.RouterGroup)
func (*AnswerAPIRouter) RegisterMustUnAuthAnswerAPIRouter ¶
func (a *AnswerAPIRouter) RegisterMustUnAuthAnswerAPIRouter(authUserMiddleware *middleware.AuthUserMiddleware, r *gin.RouterGroup)
func (*AnswerAPIRouter) RegisterUnAuthAnswerAPIRouter ¶
func (a *AnswerAPIRouter) RegisterUnAuthAnswerAPIRouter(r *gin.RouterGroup)
type PluginAPIRouter ¶
type PluginAPIRouter struct {
// contains filtered or unexported fields
}
func NewPluginAPIRouter ¶
func NewPluginAPIRouter( connectorController *controller.ConnectorController, userCenterController *controller.UserCenterController, captchaController *controller.CaptchaController, embedController *controller.EmbedController, ) *PluginAPIRouter
func (*PluginAPIRouter) RegisterAuthAdminConnectorRouter ¶
func (pr *PluginAPIRouter) RegisterAuthAdminConnectorRouter(r *gin.RouterGroup)
func (*PluginAPIRouter) RegisterAuthUserConnectorRouter ¶
func (pr *PluginAPIRouter) RegisterAuthUserConnectorRouter(r *gin.RouterGroup)
func (*PluginAPIRouter) RegisterUnAuthConnectorRouter ¶
func (pr *PluginAPIRouter) RegisterUnAuthConnectorRouter(r *gin.RouterGroup)
type StaticRouter ¶
type StaticRouter struct {
// contains filtered or unexported fields
}
StaticRouter static api router
func NewStaticRouter ¶
func NewStaticRouter(serviceConfig *service_config.ServiceConfig) *StaticRouter
NewStaticRouter new static api router
func (*StaticRouter) RegisterStaticRouter ¶
func (a *StaticRouter) RegisterStaticRouter(r *gin.RouterGroup)
RegisterStaticRouter register static api router
type SwaggerConfig ¶
type SwaggerConfig struct { Show bool `json:"show" mapstructure:"show" yaml:"show"` Protocol string `json:"protocol" mapstructure:"protocol" yaml:"protocol"` Host string `json:"host" mapstructure:"host" yaml:"host"` Address string `json:"address" mapstructure:"address" yaml:"address"` }
SwaggerConfig struct describes configure for the Swagger API endpoint
type SwaggerRouter ¶
type SwaggerRouter struct {
// contains filtered or unexported fields
}
SwaggerRouter swagger api router
func NewSwaggerRouter ¶
func NewSwaggerRouter(config *SwaggerConfig) *SwaggerRouter
NewSwaggerRouter new swagger api router
func (*SwaggerRouter) InitSwaggerDocs ¶
func (a *SwaggerRouter) InitSwaggerDocs()
InitSwaggerDocs init swagger docs
func (*SwaggerRouter) Register ¶
func (a *SwaggerRouter) Register(r *gin.RouterGroup)
Register register swagger api router
type TemplateRouter ¶
type TemplateRouter struct {
// contains filtered or unexported fields
}
func NewTemplateRouter ¶
func NewTemplateRouter( templateController *controller.TemplateController, templateRenderController *templaterender.TemplateRenderController, siteInfoController *controller_admin.SiteInfoController, authUserMiddleware *middleware.AuthUserMiddleware, ) *TemplateRouter
func (*TemplateRouter) RegisterTemplateRouter ¶
func (a *TemplateRouter) RegisterTemplateRouter(r *gin.RouterGroup, baseURLPath string)
RegisterTemplateRouter template router
type UIRouter ¶
type UIRouter struct {
// contains filtered or unexported fields
}
UIRouter is an interface that provides ui static file routers
func NewUIRouter ¶
func NewUIRouter( siteInfoController *controller.SiteInfoController, siteInfoService siteinfo_common.SiteInfoCommonService, ) *UIRouter
NewUIRouter creates a new UIRouter instance with the embed resources
Click to show internal directories.
Click to hide internal directories.