router

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: Apache-2.0 Imports: 18 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,
	adminReportController *controller_admin.ReportController,
	adminUserController *controller_admin.UserAdminController,
	reasonController *controller.ReasonController,
	themeController *controller_admin.ThemeController,
	siteInfoController *controller_admin.SiteInfoController,
	siteinfoController *controller.SiteinfoController,
	notificationController *controller.NotificationController,
	dashboardController *controller.DashboardController,
	uploadController *controller.UploadController,
	activityController *controller.ActivityController,
	roleController *controller_admin.RoleController,
) *AnswerAPIRouter

func (*AnswerAPIRouter) RegisterAnswerAPIRouter

func (a *AnswerAPIRouter) RegisterAnswerAPIRouter(r *gin.RouterGroup)

func (*AnswerAPIRouter) RegisterAnswerAdminAPIRouter added in v1.0.1

func (a *AnswerAPIRouter) RegisterAnswerAdminAPIRouter(r *gin.RouterGroup)

func (*AnswerAPIRouter) RegisterMustUnAuthAnswerAPIRouter added in v1.0.0

func (a *AnswerAPIRouter) RegisterMustUnAuthAnswerAPIRouter(r *gin.RouterGroup)

func (*AnswerAPIRouter) RegisterUnAuthAnswerAPIRouter

func (a *AnswerAPIRouter) RegisterUnAuthAnswerAPIRouter(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 added in v1.0.0

type TemplateRouter struct {
	// contains filtered or unexported fields
}

func NewTemplateRouter added in v1.0.0

func NewTemplateRouter(
	templateController *controller.TemplateController,
	templateRenderController *templaterender.TemplateRenderController,
	siteInfoController *controller_admin.SiteInfoController,

) *TemplateRouter

func (*TemplateRouter) RegisterTemplateRouter added in v1.0.0

func (a *TemplateRouter) RegisterTemplateRouter(r *gin.RouterGroup)

TemplateRouter 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)

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