router

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: Apache-2.0 Imports: 15 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,
	backyardReportController *controller_backyard.ReportController,
	backyardUserController *controller_backyard.UserBackyardController,
	reasonController *controller.ReasonController,
	themeController *controller_backyard.ThemeController,
	siteInfoController *controller_backyard.SiteInfoController,
	siteinfoController *controller.SiteinfoController,
	notificationController *controller.NotificationController,
	dashboardController *controller.DashboardController,
	uploadController *controller.UploadController,
	activityController *controller.ActivityController,
) *AnswerAPIRouter

func (*AnswerAPIRouter) RegisterAnswerAPIRouter

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

func (*AnswerAPIRouter) RegisterAnswerCmsAPIRouter

func (a *AnswerAPIRouter) RegisterAnswerCmsAPIRouter(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 UIRouter

type UIRouter struct {
}

UIRouter is an interface that provides ui static file routers

func NewUIRouter

func NewUIRouter() *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