router

package
v1.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const UIIndexFilePath = "build/index.html"
View Source
const UIRootFilePath = "build"
View Source
const UIStaticPath = "build/static"

Variables

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,
	badgeController *controller.BadgeController,
	adminBadgeController *controller_admin.BadgeController,
) *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,
	renderController *controller.RenderController,
) *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

func (*UIRouter) Register

func (a *UIRouter) Register(r *gin.Engine, baseURLPath string)

Register a new static resource which generated by ui directory

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL