{"modulePath":"github.com/apache/answer","version":"v1.7.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package controller\n\n## Constants\n\n```go\nconst (\n\tConnectorLoginRouterPrefix    = \"/connector/login/\"\n\tConnectorRedirectRouterPrefix = \"/connector/redirect/\"\n)\n```\n\n```go\nconst (\n\tUserCenterLoginRouter          = \"/user-center/login/redirect\"\n\tUserCenterSignUpRedirectRouter = \"/user-center/sign-up/redirect\"\n)\n```\n\n## Variables\n\n```go\nvar ProviderSetController = wire.NewSet(\n\tNewLangController,\n\tNewCommentController,\n\tNewReportController,\n\tNewVoteController,\n\tNewTagController,\n\tNewFollowController,\n\tNewCollectionController,\n\tNewUserController,\n\tNewQuestionController,\n\tNewAnswerController,\n\tNewSearchController,\n\tNewRevisionController,\n\tNewRankController,\n\tNewReasonController,\n\tNewNotificationController,\n\tNewSiteInfoController,\n\tNewDashboardController,\n\tNewUploadController,\n\tNewActivityController,\n\tNewTemplateController,\n\tNewConnectorController,\n\tNewUserCenterController,\n\tNewPermissionController,\n\tNewUserPluginController,\n\tNewReviewController,\n\tNewCaptchaController,\n\tNewMetaController,\n\tNewEmbedController,\n\tNewBadgeController,\n\tNewRenderController,\n\tNewSidebarController,\n)\n```\nProviderSetController is controller providers.\n\n```go\nvar SiteUrl = \"\"\n```\n\n## Functions\n\n```go\nfunc GetStyle() (script []string, css string)\n```\n\n## Types\n\n```go\ntype ActivityController struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewActivityController(\n\tactivityService *activity.ActivityService) *ActivityController\n```\nNewActivityController new activity controller.\n\n```go\nfunc (ac *ActivityController) GetObjectTimeline(ctx *gin.Context)\n```\nGetObjectTimeline get object timeline @Summary get object timeline @Description get object timeline @Tags Comment @Produce json @Param object\\_id query string false \"object id\" @Param tag\\_slug\\_name query string false \"tag slug name\" @Param object\\_type query string false \"object type\" Enums(question, answer, tag) @Param show\\_vote query boolean false \"is show vote\" @Success 200 {object} handler.RespBody{data=schema.GetObjectTimelineResp} @Router /answer/api/v1/activity/timeline \\[get]\n\n```go\nfunc (ac *ActivityController) GetObjectTimelineDetail(ctx *gin.Context)\n```\nGetObjectTimelineDetail get object timeline detail @Summary get object timeline detail @Description get object timeline detail @Tags Comment @Produce json @Param revision\\_id query string true \"revision id\" @Success 200 {object} handler.RespBody{data=schema.GetObjectTimelineResp} @Router /answer/api/v1/activity/timeline/detail \\[get]\n\n```go\ntype AnswerController struct {\n\t// contains filtered or unexported fields\n}\n```\nAnswerController answer controller\n\n```go\nfunc NewAnswerController(\n\tanswerService *content.AnswerService,\n\trankService *rank.RankService,\n\tactionService *action.CaptchaService,\n\tsiteInfoCommonService siteinfo_common.SiteInfoCommonService,\n\trateLimitMiddleware *middleware.RateLimitMiddleware,\n) *AnswerController\n```\nNewAnswerController new controller\n\n```go\nfunc (ac *AnswerController) AcceptAnswer(ctx *gin.Context)\n```\nAcceptAnswer accept answer @Summary Accept Answer @Description Accept Answer @Tags Answer @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.AcceptAnswerReq true \"AcceptAnswerReq\" @Success 200 {object} handler.RespBody{} @Router /answer/api/v1/answer/acceptance \\[post]\n\n```go\nfunc (ac *AnswerController) AddAnswer(ctx *gin.Context)\n```\nAddAnswer add answer @Summary Add Answer @Description add answer @Tags Answer @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.AnswerAddReq true \"add answer request\" @Success 200 {object} handler.RespBody{} @Router /answer/api/v1/answer \\[post]\n\n```go\nfunc (ac *AnswerController) AdminUpdateAnswerStatus(ctx *gin.Context)\n```\nAdminUpdateAnswerStatus update answer status @Summary update answer status @Description update answer status @Tags admin @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.AdminUpdateAnswerStatusReq true \"AdminUpdateAnswerStatusReq\" @Success 200 {object} handler.RespBody @Router /answer/admin/api/answer/status \\[put]\n\n```go\nfunc (ac *AnswerController) AnswerList(ctx *gin.Context)\n```\nAnswerList godoc @Summary AnswerList @Description AnswerList \\\u003cbr\u003e \\\u003cb\u003eorder\\\u003c/b\u003e (default or updated) @Tags Answer @Accept json @Produce json @Param question\\_id query string true \"question\\_id\" @Param order query string true \"order\" @Param page query string true \"page\" @Param page\\_size query string true \"page\\_size\" @Success 200 {string} string \"\" @Router /answer/api/v1/answer/page \\[get]\n\n```go\nfunc (ac *AnswerController) GetAnswerInfo(ctx *gin.Context)\n```\nGetAnswerInfo get answer info @Summary Get Answer Detail @Description Get Answer Detail @Tags Answer @Accept json @Produce json @Param id query string true \"id\" @Success 200 {object} handler.RespBody{data=schema.GetAnswerInfoResp} @Router /answer/api/v1/answer/info \\[get]\n\n```go\nfunc (ac *AnswerController) RecoverAnswer(ctx *gin.Context)\n```\nRecoverAnswer recover answer @Summary recover answer @Description recover the deleted answer @Tags Answer @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.RecoverAnswerReq true \"answer\" @Success 200 {object} handler.RespBody @Router /answer/api/v1/answer/recover \\[post]\n\n```go\nfunc (ac *AnswerController) RemoveAnswer(ctx *gin.Context)\n```\nRemoveAnswer delete answer @Summary delete answer @Description delete answer @Tags Answer @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.RemoveAnswerReq true \"answer\" @Success 200 {object} handler.RespBody @Router /answer/api/v1/answer \\[delete]\n\n```go\nfunc (ac *AnswerController) UpdateAnswer(ctx *gin.Context)\n```\nUpdateAnswer update answer @Summary Update Answer @Description Update Answer @Tags Answer @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.AnswerUpdateReq true \"AnswerUpdateReq\" @Success 200 {object} handler.RespBody{} @Router /answer/api/v1/answer \\[put]\n\n```go\ntype BadgeController struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewBadgeController(\n\tbadgeService *badge.BadgeService,\n\tbadgeAwardService *badge.BadgeAwardService) *BadgeController\n```\n\n```go\nfunc (b *BadgeController) GetAllBadgeAwardListByUsername(ctx *gin.Context)\n```\nGetAllBadgeAwardListByUsername get user badge award list @Summary get user badge award list @Description get user badge award list @Tags api-badge @Accept json @Produce json @Param username query string true \"user name\" @Success 200 {object} handler.RespBody{data=\\[]schema.GetUserBadgeAwardListResp} @Router /answer/api/v1/badge/user/awards \\[get]\n\n```go\nfunc (b *BadgeController) GetBadgeAwardList(ctx *gin.Context)\n```\nGetBadgeAwardList get badge award list @Summary get badge award list @Description get badge award list @Tags api-badge @Accept json @Produce json @Param page query int false \"page\" @Param page\\_size query int false \"page size\" @Param badge\\_id query string true \"badge id\" @Param username query string false \"only list the award by username\" @Success 200 {object} handler.RespBody{data=schema.GetBadgeInfoResp} @Router /answer/api/v1/badge/awards/page \\[get]\n\n```go\nfunc (b *BadgeController) GetBadgeInfo(ctx *gin.Context)\n```\nGetBadgeInfo get badge info @Summary get badge info @Description get badge info @Tags api-badge @Accept json @Produce json @Param id query string true \"id\" default(string) @Success 200 {object} handler.RespBody{data=schema.GetBadgeInfoResp} @Router /answer/api/v1/badge \\[get]\n\n```go\nfunc (b *BadgeController) GetBadgeList(ctx *gin.Context)\n```\nGetBadgeList list all badges @Summary list all badges group by group @Description list all badges group by group @Tags api-badge @Accept json @Produce json @Success 200 {object} handler.RespBody{data=\\[]schema.GetBadgeListResp} @Router /answer/api/v1/badges \\[get]\n\n```go\nfunc (b *BadgeController) GetRecentBadgeAwardListByUsername(ctx *gin.Context)\n```\nGetRecentBadgeAwardListByUsername get user badge award list @Summary get user badge award list @Description get user badge award list @Tags api-badge @Accept json @Produce json @Param username query string true \"user name\" @Success 200 {object} handler.RespBody{data=\\[]schema.GetUserBadgeAwardListResp} @Router /answer/api/v1/badge/user/awards/recent \\[get]\n\n```go\ntype CaptchaController struct {\n}\n```\nCaptchaController comment controller\n\n```go\nfunc NewCaptchaController() *CaptchaController\n```\nNewCaptchaController new controller\n\n```go\nfunc (uc *CaptchaController) GetCaptchaConfig(ctx *gin.Context)\n```\nGetCaptchaConfig get captcha config\n\n```go\ntype CollectionController struct {\n\t// contains filtered or unexported fields\n}\n```\nCollectionController collection controller\n\n```go\nfunc NewCollectionController(collectionService *collection.CollectionService) *CollectionController\n```\nNewCollectionController new controller\n\n```go\nfunc (cc *CollectionController) CollectionSwitch(ctx *gin.Context)\n```\nCollectionSwitch add collection @Summary add collection @Description add collection @Tags Collection @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.CollectionSwitchReq true \"collection\" @Success 200 {object} handler.RespBody{data=schema.CollectionSwitchResp} @Router /answer/api/v1/collection/switch \\[post]\n\n```go\ntype CommentController struct {\n\t// contains filtered or unexported fields\n}\n```\nCommentController comment controller\n\n```go\nfunc NewCommentController(\n\tcommentService *comment.CommentService,\n\trankService *rank.RankService,\n\tactionService *action.CaptchaService,\n\trateLimitMiddleware *middleware.RateLimitMiddleware,\n) *CommentController\n```\nNewCommentController new controller\n\n```go\nfunc (cc *CommentController) AddComment(ctx *gin.Context)\n```\nAddComment add comment @Summary add comment @Description add comment @Tags Comment @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.AddCommentReq true \"comment\" @Success 200 {object} handler.RespBody{data=schema.GetCommentResp} @Router /answer/api/v1/comment \\[post]\n\n```go\nfunc (cc *CommentController) GetComment(ctx *gin.Context)\n```\nGetComment godoc @Summary get comment by id @Description get comment by id @Tags Comment @Produce json @Param id query string true \"id\" @Success 200 {object} handler.RespBody{data=pager.PageModel{list=\\[]schema.GetCommentResp}} @Router /answer/api/v1/comment \\[get]\n\n```go\nfunc (cc *CommentController) GetCommentPersonalWithPage(ctx *gin.Context)\n```\nGetCommentPersonalWithPage user personal comment list @Summary user personal comment list @Description user personal comment list @Tags Comment @Produce json @Param page query int false \"page\" @Param page\\_size query int false \"page size\" @Param username query string false \"username\" @Success 200 {object} handler.RespBody{data=pager.PageModel{list=\\[]schema.GetCommentPersonalWithPageResp}} @Router /answer/api/v1/personal/comment/page \\[get]\n\n```go\nfunc (cc *CommentController) GetCommentWithPage(ctx *gin.Context)\n```\nGetCommentWithPage get comment page @Summary get comment page @Description get comment page @Tags Comment @Produce json @Param page query int false \"page\" @Param page\\_size query int false \"page size\" @Param object\\_id query string true \"object id\" @Param query\\_cond query string false \"query condition\" Enums(vote) @Success 200 {object} handler.RespBody{data=pager.PageModel{list=\\[]schema.GetCommentResp}} @Router /answer/api/v1/comment/page \\[get]\n\n```go\nfunc (cc *CommentController) RemoveComment(ctx *gin.Context)\n```\nRemoveComment remove comment @Summary remove comment @Description remove comment @Tags Comment @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.RemoveCommentReq true \"comment\" @Success 200 {object} handler.RespBody @Router /answer/api/v1/comment \\[delete]\n\n```go\nfunc (cc *CommentController) UpdateComment(ctx *gin.Context)\n```\nUpdateComment update comment @Summary update comment @Description update comment @Tags Comment @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.UpdateCommentReq true \"comment\" @Success 200 {object} handler.RespBody @Router /answer/api/v1/comment \\[put]\n\n```go\ntype ConnectorController struct {\n\t// contains filtered or unexported fields\n}\n```\nConnectorController comment controller\n\n```go\nfunc NewConnectorController(\n\tsiteInfoService siteinfo_common.SiteInfoCommonService,\n\temailService *export.EmailService,\n\tuserExternalService *user_external_login.UserExternalLoginService,\n) *ConnectorController\n```\nNewConnectorController new controller\n\n```go\nfunc (cc *ConnectorController) ConnectorLogin(connector plugin.Connector) (fn func(ctx *gin.Context))\n```\n\n```go\nfunc (cc *ConnectorController) ConnectorLoginDispatcher(ctx *gin.Context)\n```\nConnectorLoginDispatcher dispatch connector login request to specific connector by slug name We can't register specific router for each connector when application start, because the plugin status will be changed by admin. If the plugin is disabled, the router should be unavailable.\n\n```go\nfunc (cc *ConnectorController) ConnectorRedirect(connector plugin.Connector) (fn func(ctx *gin.Context))\n```\n\n```go\nfunc (cc *ConnectorController) ConnectorRedirectDispatcher(ctx *gin.Context)\n```\n\n```go\nfunc (cc *ConnectorController) ConnectorsInfo(ctx *gin.Context)\n```\nConnectorsInfo get all enabled connectors @Summary get all enabled connectors @Description get all enabled connectors @Tags PluginConnector @Security ApiKeyAuth @Produce  json @Success 200 {object} handler.RespBody{data=\\[]schema.ConnectorInfoResp} @Router /answer/api/v1/connector/info \\[get]\n\n```go\nfunc (cc *ConnectorController) ConnectorsUserInfo(ctx *gin.Context)\n```\nConnectorsUserInfo get all connectors info about user @Summary get all connectors info about user @Description get all connectors info about user @Tags PluginConnector @Security ApiKeyAuth @Produce json @Success 200 {object} handler.RespBody{data=\\[]schema.ConnectorUserInfoResp} @Router /answer/api/v1/connector/user/info \\[get]\n\n```go\nfunc (cc *ConnectorController) ExternalLoginBindingUserSendEmail(ctx *gin.Context)\n```\nExternalLoginBindingUserSendEmail external login binding user send email @Summary external login binding user send email @Description external login binding user send email @Tags PluginConnector @Accept json @Produce json @Param data body schema.ExternalLoginBindingUserSendEmailReq  true \"external login binding user send email\" @Success 200 {object} handler.RespBody{data=schema.ExternalLoginBindingUserSendEmailResp} @Router /answer/api/v1/connector/binding/email \\[post]\n\n```go\nfunc (cc *ConnectorController) ExternalLoginUnbinding(ctx *gin.Context)\n```\nExternalLoginUnbinding unbind external user login @Summary unbind external user login @Description unbind external user login @Tags PluginConnector @Security ApiKeyAuth @Accept json @Produce json @Param data body schema.ExternalLoginUnbindingReq true \"ExternalLoginUnbindingReq\" @Success 200 {object} handler.RespBody{} @Router /answer/api/v1/connector/user/unbinding \\[delete]\n\n```go\ntype DashboardController struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewDashboardController(\n\tdashboardService dashboard.DashboardService,\n) *DashboardController\n```\nNewDashboardController new controller\n\n```go\nfunc (ac *DashboardController) DashboardInfo(ctx *gin.Context)\n```\nDashboardInfo godoc @Summary DashboardInfo @Description DashboardInfo @Tags admin @Accept json @Produce json @Security ApiKeyAuth @Router /answer/admin/api/dashboard \\[get] @Success 200 {object} handler.RespBody\n\n```go\ntype EmbedController struct {\n}\n```\n\n```go\nfunc NewEmbedController() *EmbedController\n```\n\n```go\nfunc (c *EmbedController) GetEmbedConfig(ctx *gin.Context)\n```\nGetEmbedConfig get embed plugin config @Summary get embed plugin config @Description get embed plugin config @Tags Plugin @Accept json @Produce json @Success 200 {object} handler.RespBody{data=\\[]plugin.EmbedConfig} @Router /answer/api/v1/embed/config \\[get]\n\n```go\ntype FollowController struct {\n\t// contains filtered or unexported fields\n}\n```\nFollowController activity controller\n\n```go\nfunc NewFollowController(followService *follow.FollowService) *FollowController\n```\nNewFollowController new controller\n\n```go\nfunc (fc *FollowController) Follow(ctx *gin.Context)\n```\nFollow godoc @Summary follow object or cancel follow operation @Description follow object or cancel follow operation @Tags Activity @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.FollowReq true \"follow\" @Success 200 {object} handler.RespBody{data=schema.FollowResp} @Router /answer/api/v1/follow \\[post]\n\n```go\nfunc (fc *FollowController) UpdateFollowTags(ctx *gin.Context)\n```\nUpdateFollowTags update user follow tags @Summary update user follow tags @Description update user follow tags @Tags Activity @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.UpdateFollowTagsReq true \"follow\" @Success 200 {object} handler.RespBody{} @Router /answer/api/v1/follow/tags \\[put]\n\n```go\ntype GetCaptchaConfigResp struct {\n\tSlugName string         `json:\"slug_name\"`\n\tConfig   map[string]any `json:\"config\"`\n}\n```\n\n```go\ntype LangController struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewLangController(tr i18n.Translator, siteInfoService siteinfo_common.SiteInfoCommonService) *LangController\n```\nNewLangController new language controller.\n\n```go\nfunc (u *LangController) GetAdminLangOptions(ctx *gin.Context)\n```\nGetAdminLangOptions Get language options @Summary Get language options @Description Get language options @Security ApiKeyAuth @Tags Lang @Produce json @Success 200 {object} handler.RespBody{} @Router /answer/admin/api/language/options \\[get]\n\n```go\nfunc (u *LangController) GetLangMapping(ctx *gin.Context)\n```\nGetLangMapping get language config mapping @Summary get language config mapping @Description get language config mapping @Tags Lang @Param Accept-Language header string true \"Accept-Language\" @Produce json @Success 200 {object} handler.RespBody{} @Router /answer/api/v1/language/config \\[get]\n\n```go\nfunc (u *LangController) GetUserLangOptions(ctx *gin.Context)\n```\nGetUserLangOptions Get language options @Summary Get language options @Description Get language options @Tags Lang @Produce json @Success 200 {object} handler.RespBody{} @Router /answer/api/v1/language/options \\[get]\n\n```go\ntype MetaController struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewMetaController(\n\tmetaService *meta.MetaService,\n) *MetaController\n```\n\n```go\nfunc (mc *MetaController) AddOrUpdateReaction(ctx *gin.Context)\n```\nAddOrUpdateReaction add or update reaction @Summary add or update reaction @Description update reaction. if not exist, add one @Tags Meta @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.UpdateReactionReq true \"reaction\" @Success 200 {object} handler.RespBody @Router /answer/api/v1/meta/reaction \\[put]\n\n```go\nfunc (mc *MetaController) GetReaction(ctx *gin.Context)\n```\nGetReaction get reaction @Summary get reaction @Description get reaction for an object @Tags Meta @Accept json @Produce json @Param object\\_id query string true \"object\\_id\" @Success 200 {object} handler.RespBody{data=schema.ReactionRespItem} @Router /answer/api/v1/meta/reaction \\[get]\n\n```go\ntype NotificationController struct {\n\t// contains filtered or unexported fields\n}\n```\nNotificationController notification controller\n\n```go\nfunc NewNotificationController(\n\tnotificationService *notification.NotificationService,\n\trankService *rank.RankService,\n) *NotificationController\n```\nNewNotificationController new controller\n\n```go\nfunc (nc *NotificationController) ClearIDUnRead(ctx *gin.Context)\n```\nClearIDUnRead @Summary ClearUnRead @Description ClearUnRead @Tags Notification @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.NotificationClearIDRequest true \"NotificationClearIDRequest\" @Success 200 {object} handler.RespBody @Router /answer/api/v1/notification/read/state \\[put]\n\n```go\nfunc (nc *NotificationController) ClearRedDot(ctx *gin.Context)\n```\nClearRedDot @Summary DelRedDot @Description DelRedDot @Tags Notification @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.NotificationClearRequest true \"NotificationClearRequest\" @Success 200 {object} handler.RespBody @Router /answer/api/v1/notification/status \\[put]\n\n```go\nfunc (nc *NotificationController) ClearUnRead(ctx *gin.Context)\n```\nClearUnRead @Summary ClearUnRead @Description ClearUnRead @Tags Notification @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.NotificationClearRequest true \"NotificationClearRequest\" @Success 200 {object} handler.RespBody @Router /answer/api/v1/notification/read/state/all \\[put]\n\n```go\nfunc (nc *NotificationController) GetList(ctx *gin.Context)\n```\nGetList get notification list @Summary get notification list @Description get notification list @Tags Notification @Accept json @Produce json @Security ApiKeyAuth @Param page query int false \"page size\" @Param page\\_size query int false \"page size\" @Param type query string true \"type\" Enums(inbox,achievement) @Param inbox\\_type query string true \"inbox\\_type\" Enums(all,posts,invites,votes) @Success 200 {object} handler.RespBody @Router /answer/api/v1/notification/page \\[get]\n\n```go\nfunc (nc *NotificationController) GetRedDot(ctx *gin.Context)\n```\nGetRedDot @Summary GetRedDot @Description GetRedDot @Tags Notification @Accept json @Produce json @Security ApiKeyAuth @Success 200 {object} handler.RespBody @Router /answer/api/v1/notification/status \\[get]\n\n```go\ntype PermissionController struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewPermissionController(rankService *rank.RankService) *PermissionController\n```\nNewPermissionController new language controller.\n\n```go\nfunc (u *PermissionController) GetPermission(ctx *gin.Context)\n```\nGetPermission check user permission @Summary check user permission @Description check user permission @Tags Permission @Security ApiKeyAuth @Param Authorization header string true \"access-token\" @Produce json @Param action query string true \"permission key\" Enums(question.add, question.edit, question.edit\\_without\\_review, question.delete, question.close, question.reopen, question.vote\\_up, question.vote\\_down, question.pin, question.unpin, question.hide, question.show, answer.add, answer.edit, answer.edit\\_without\\_review, answer.delete, answer.accept, answer.vote\\_up, answer.vote\\_down, answer.invite\\_someone\\_to\\_answer, comment.add, comment.edit, comment.delete, comment.vote\\_up, comment.vote\\_down, report.add, tag.add, tag.edit, tag.edit\\_slug\\_name, tag.edit\\_without\\_review, tag.delete, tag.synonym, link.url\\_limit, vote.detail, answer.audit, question.audit, tag.audit, tag.use\\_reserved\\_tag) @Success 200 {object} handler.RespBody{data=map\\[string]bool} @Router /answer/api/v1/permission \\[get]\n\n```go\ntype QuestionController struct {\n\t// contains filtered or unexported fields\n}\n```\nQuestionController question controller\n\n```go\nfunc NewQuestionController(\n\tquestionService *content.QuestionService,\n\tanswerService *content.AnswerService,\n\trankService *rank.RankService,\n\tsiteInfoService siteinfo_common.SiteInfoCommonService,\n\tactionService *action.CaptchaService,\n\trateLimitMiddleware *middleware.RateLimitMiddleware,\n) *QuestionController\n```\nNewQuestionController new controller\n\n```go\nfunc (qc *QuestionController) AddQuestion(ctx *gin.Context)\n```\nAddQuestion add question @Summary add question @Description add question @Tags Question @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.QuestionAdd true \"question\" @Success 200 {object} handler.RespBody @Router /answer/api/v1/question \\[post]\n\n```go\nfunc (qc *QuestionController) AddQuestionByAnswer(ctx *gin.Context)\n```\nAddQuestionByAnswer add question @Summary add question and answer @Description add question and answer @Tags Question @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.QuestionAddByAnswer true \"question\" @Success 200 {object} handler.RespBody @Router /answer/api/v1/question/answer \\[post]\n\n```go\nfunc (qc *QuestionController) AdminAnswerPage(ctx *gin.Context)\n```\nAdminAnswerPage admin answer page @Summary AdminAnswerPage admin answer page @Description Status:\\[available,deleted,pending] @Tags admin @Accept json @Produce json @Security ApiKeyAuth @Param page query int false \"page size\" @Param page\\_size query int false \"page size\" @Param status query string false \"user status\" Enums(available,deleted,pending) @Param query query string false \"answer id or question title\" @Param question\\_id query string false \"question id\" @Success 200 {object} handler.RespBody @Router /answer/admin/api/answer/page \\[get]\n\n```go\nfunc (qc *QuestionController) AdminQuestionPage(ctx *gin.Context)\n```\nAdminQuestionPage admin question page @Summary AdminQuestionPage admin question page @Description Status:\\[available,closed,deleted,pending] @Tags admin @Accept json @Produce json @Security ApiKeyAuth @Param page query int false \"page size\" @Param page\\_size query int false \"page size\" @Param status query string false \"user status\" Enums(available, closed, deleted, pending) @Param query query string false \"question id or title\" @Success 200 {object} handler.RespBody @Router /answer/admin/api/question/page \\[get]\n\n```go\nfunc (qc *QuestionController) AdminUpdateQuestionStatus(ctx *gin.Context)\n```\nAdminUpdateQuestionStatus update question status @Summary update question status @Description update question status @Tags admin @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.AdminUpdateQuestionStatusReq true \"AdminUpdateQuestionStatusReq\" @Success 200 {object} handler.RespBody @Router /answer/admin/api/question/status \\[put]\n\n```go\nfunc (qc *QuestionController) CloseQuestion(ctx *gin.Context)\n```\nCloseQuestion Close question @Summary Close question @Description Close question @Tags Question @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.CloseQuestionReq true \"question\" @Success 200 {object} handler.RespBody @Router  /answer/api/v1/question/status \\[put]\n\n```go\nfunc (qc *QuestionController) GetQuestion(ctx *gin.Context)\n```\nGetQuestion get question details @Summary get question details @Description get question details @Tags Question @Accept  json @Produce  json @Param id query string true \"Question TagID\"  default(1) @Success 200 {string} string \"\" @Router /answer/api/v1/question/info \\[get]\n\n```go\nfunc (qc *QuestionController) GetQuestionInviteUserInfo(ctx *gin.Context)\n```\nGetQuestionInviteUserInfo get question invite user info @Summary get question invite user info @Description get question invite user info @Tags Question @Accept  json @Produce  json @Param id query string true \"Question ID\"  default(1) @Success 200 {string} string \"\" @Router /answer/api/v1/question/invite \\[get]\n\n```go\nfunc (qc *QuestionController) GetQuestionLink(ctx *gin.Context)\n```\nGetQuestionLink get question link @Summary get question link @Description get question link @Tags Question @Param data query schema.GetQuestionLinkReq  true \"GetQuestionLinkReq\" @Success 200 {object} handler.RespBody{data=pager.PageModel{list=\\[]schema.QuestionPageResp}} @Router /answer/api/v1/question/link \\[get]\n\n```go\nfunc (qc *QuestionController) GetSimilarQuestions(ctx *gin.Context)\n```\nGetSimilarQuestions fuzzy query similar questions based on title @Summary fuzzy query similar questions based on title @Description fuzzy query similar questions based on title @Tags Question @Accept json @Produce json @Security ApiKeyAuth @Param title query string true \"title\"  default(string) @Success 200 {object} handler.RespBody @Router /answer/api/v1/question/similar \\[get]\n\n```go\nfunc (qc *QuestionController) OperationQuestion(ctx *gin.Context)\n```\nOperationQuestion Operation question @Summary Operation question @Description Operation question \\\\n operation \\[pin unpin hide show] @Tags Question @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.OperationQuestionReq true \"question\" @Success 200 {object} handler.RespBody @Router  /answer/api/v1/question/operation \\[put]\n\n```go\nfunc (qc *QuestionController) PersonalAnswerPage(ctx *gin.Context)\n```\nPersonalAnswerPage list personal answers @Summary list personal answers @Description list personal answers @Tags Personal @Accept json @Produce json @Security ApiKeyAuth @Param username query string true \"username\"  default(string) @Param order query string true \"order\"  Enums(newest,score) @Param page query string true \"page\"  default(0) @Param page\\_size query string true \"page\\_size\"  default(20) @Success 200 {object} handler.RespBody @Router /answer/api/v1/personal/answer/page \\[get]\n\n```go\nfunc (qc *QuestionController) PersonalCollectionPage(ctx *gin.Context)\n```\nPersonalCollectionPage list personal collections @Summary list personal collections @Description list personal collections @Tags Collection @Accept json @Produce json @Security ApiKeyAuth @Param page query string true \"page\"  default(0) @Param page\\_size query string true \"page\\_size\"  default(20) @Success 200 {object} handler.RespBody @Router /answer/api/v1/personal/collection/page \\[get]\n\n```go\nfunc (qc *QuestionController) PersonalQuestionPage(ctx *gin.Context)\n```\nPersonalQuestionPage list personal questions @Summary list personal questions @Description list personal questions @Tags Personal @Accept json @Produce json @Security ApiKeyAuth @Param username query string true \"username\"  default(string) @Param order query string true \"order\"  Enums(newest,score) @Param page query string true \"page\"  default(0) @Param page\\_size query string true \"page\\_size\" default(20) @Success 200 {object} handler.RespBody @Router /personal/question/page \\[get]\n\n```go\nfunc (qc *QuestionController) QuestionPage(ctx *gin.Context)\n```\nQuestionPage get questions by page @Summary get questions by page @Description get questions by page @Tags Question @Accept  json @Produce  json @Param data body schema.QuestionPageReq  true \"QuestionPageReq\" @Success 200 {object} handler.RespBody{data=pager.PageModel{list=\\[]schema.QuestionPageResp}} @Router /answer/api/v1/question/page \\[get]\n\n```go\nfunc (qc *QuestionController) QuestionRecommendPage(ctx *gin.Context)\n```\nQuestionRecommendPage get recommend questions by page @Summary get recommend questions by page @Description get recommend questions by page @Tags Question @Accept  json @Produce  json @Param data body schema.QuestionPageReq  true \"QuestionPageReq\" @Success 200 {object} handler.RespBody{data=pager.PageModel{list=\\[]schema.QuestionPageResp}} @Router /answer/api/v1/question/recommend/page \\[get]\n\n```go\nfunc (qc *QuestionController) QuestionRecover(ctx *gin.Context)\n```\nQuestionRecover recover deleted question @Summary recover deleted question @Description recover deleted question @Tags Question @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.QuestionRecoverReq true \"question\" @Success 200 {object} handler.RespBody @Router /answer/api/v1/question/recover \\[post]\n\n```go\nfunc (qc *QuestionController) RemoveQuestion(ctx *gin.Context)\n```\nRemoveQuestion delete question @Summary delete question @Description delete question @Tags Question @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.RemoveQuestionReq true \"question\" @Success 200 {object} handler.RespBody @Router  /answer/api/v1/question \\[delete]\n\n```go\nfunc (qc *QuestionController) ReopenQuestion(ctx *gin.Context)\n```\nReopenQuestion reopen question @Summary reopen question @Description reopen question @Tags Question @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.ReopenQuestionReq true \"question\" @Success 200 {object} handler.RespBody @Router /answer/api/v1/question/reopen \\[put]\n\n```go\nfunc (qc *QuestionController) SimilarQuestion(ctx *gin.Context)\n```\nSimilarQuestion godoc @Summary Search Similar Question @Description Search Similar Question @Tags Question @Accept  json @Produce  json @Param question\\_id query string true \"question\\_id\"  default() @Success 200 {string} string \"\" @Router /answer/api/v1/question/similar/tag \\[get]\n\n```go\nfunc (qc *QuestionController) UpdateQuestion(ctx *gin.Context)\n```\nUpdateQuestion update question @Summary update question @Description update question @Tags Question @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.QuestionUpdate true \"question\" @Success 200 {object} handler.RespBody @Router /answer/api/v1/question \\[put]\n\n```go\nfunc (qc *QuestionController) UpdateQuestionInviteUser(ctx *gin.Context)\n```\nUpdateQuestionInviteUser update question invite user @Summary update question invite user @Description update question invite user @Tags Question @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.QuestionUpdateInviteUser true \"question\" @Success 200 {object} handler.RespBody @Router /answer/api/v1/question/invite \\[put]\n\n```go\nfunc (qc *QuestionController) UserTop(ctx *gin.Context)\n```\nUserTop godoc @Summary UserTop @Description UserTop @Tags Question @Accept json @Produce json @Param username query string true \"username\"  default(string) @Success 200 {object} handler.RespBody @Router /answer/api/v1/personal/qa/top \\[get]\n\n```go\ntype RankController struct {\n\t// contains filtered or unexported fields\n}\n```\nRankController rank controller\n\n```go\nfunc NewRankController(\n\trankService *rank.RankService) *RankController\n```\nNewRankController new controller\n\n```go\nfunc (cc *RankController) GetRankPersonalWithPage(ctx *gin.Context)\n```\nGetRankPersonalWithPage user personal rank list @Summary user personal rank list @Description user personal rank list @Tags Rank @Produce json @Param page query int false \"page\" @Param page\\_size query int false \"page size\" @Param username query string false \"username\" @Success 200 {object} handler.RespBody{data=pager.PageModel{list=\\[]schema.GetRankPersonalPageResp}} @Router /answer/api/v1/personal/rank/page \\[get]\n\n```go\ntype ReasonController struct {\n\t// contains filtered or unexported fields\n}\n```\nReasonController answer controller\n\n```go\nfunc NewReasonController(answerService *reason.ReasonService) *ReasonController\n```\nNewReasonController new controller\n\n```go\nfunc (rc *ReasonController) Reasons(ctx *gin.Context)\n```\nReasons godoc @Summary get reasons by object type and action @Description get reasons by object type and action @Tags reason @Accept json @Produce json @Security ApiKeyAuth @Param object\\_type query string true \"object\\_type\" Enums(question, answer, comment, user) @Param action query string true \"action\" Enums(status, close, flag, review) @Success 200 {object} handler.RespBody @Router /answer/api/v1/reasons \\[get] @Router /answer/admin/api/reasons \\[get]\n\n```go\ntype RenderController struct {\n}\n```\n\n```go\nfunc NewRenderController() *RenderController\n```\n\n```go\nfunc (c *RenderController) GetRenderConfig(ctx *gin.Context)\n```\nGetRenderConfig godoc @Summary GetRenderConfig @Description GetRenderConfig @Tags PluginRender @Accept json @Produce json @Router /answer/api/v1/render/config \\[get] @Success 200 {object} handler.RespBody{data=plugin.RenderConfig}\n\n```go\ntype ReportController struct {\n\t// contains filtered or unexported fields\n}\n```\nReportController report controller\n\n```go\nfunc NewReportController(\n\treportService *report.ReportService,\n\trankService *rank.RankService,\n\tactionService *action.CaptchaService,\n) *ReportController\n```\nNewReportController new controller\n\n```go\nfunc (rc *ReportController) AddReport(ctx *gin.Context)\n```\nAddReport add report @Summary add report @Description add report \\\u003cbr\u003e source (question, answer, comment, user) @Tags Report @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.AddReportReq true \"report\" @Success 200 {object} handler.RespBody @Router /answer/api/v1/report \\[post]\n\n```go\nfunc (rc *ReportController) GetUnreviewedReportPostPage(ctx *gin.Context)\n```\nGetUnreviewedReportPostPage get unreviewed report post page @Summary get unreviewed report post page @Description get unreviewed report post page @Tags Report @Accept json @Produce json @Security ApiKeyAuth @Param page query int false \"page\" @Success 200 {object} handler.RespBody{data=pager.PageModel{list=\\[]schema.GetReportListPageResp}} @Router /answer/api/v1/report/unreviewed/post \\[get]\n\n```go\nfunc (rc *ReportController) ReviewReport(ctx *gin.Context)\n```\nReviewReport review report @Summary review report @Description review report @Tags Report @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.ReviewReportReq true \"flag\" @Success 200 {object} handler.RespBody @Router /answer/api/v1/report/review \\[put]\n\n```go\ntype ReviewController struct {\n\t// contains filtered or unexported fields\n}\n```\nReviewController review controller\n\n```go\nfunc NewReviewController(\n\treviewService *review.ReviewService,\n\trankService *rank.RankService,\n\tactionService *action.CaptchaService,\n) *ReviewController\n```\nNewReviewController new controller\n\n```go\nfunc (rc *ReviewController) GetUnreviewedPostPage(ctx *gin.Context)\n```\nGetUnreviewedPostPage get unreviewed post page @Summary get unreviewed post page @Description get unreviewed post page @Tags Review @Accept json @Produce json @Security ApiKeyAuth @Param page query int false \"page\" @Param object\\_id query string false \"object\\_id\" @Success 200 {object} handler.RespBody{data=pager.PageModel{list=\\[]schema.GetUnreviewedPostPageResp}} @Router /answer/api/v1/review/pending/post/page \\[get]\n\n```go\nfunc (rc *ReviewController) UpdateReview(ctx *gin.Context)\n```\nUpdateReview update review @Summary update review @Description update review @Tags Review @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.UpdateReviewReq true \"review\" @Success 200 {object} handler.RespBody @Router /answer/api/v1/review/pending/post \\[put]\n\n```go\ntype RevisionController struct {\n\t// contains filtered or unexported fields\n}\n```\nRevisionController revision controller\n\n```go\nfunc NewRevisionController(\n\trevisionListService *content.RevisionService,\n\trankService *rank.RankService,\n) *RevisionController\n```\nNewRevisionController new controller\n\n```go\nfunc (rc *RevisionController) CheckCanUpdateRevision(ctx *gin.Context)\n```\nCheckCanUpdateRevision check can update revision @Summary check can update revision @Description check can update revision @Tags Revision @Accept json @Produce json @Security ApiKeyAuth @Param id query string true \"id\" default(string) @Success 200 {object} handler.RespBody @Router /answer/api/v1/revisions/edit/check \\[get]\n\n```go\nfunc (rc *RevisionController) GetReviewingType(ctx *gin.Context)\n```\nGetReviewingType get reviewing type @Summary get reviewing type @Description get reviewing type @Tags Revision @Produce json @Security ApiKeyAuth @Success 200 {object} handler.RespBody{data=\\[]schema.GetReviewingTypeResp} @Router /answer/api/v1/reviewing/type \\[get]\n\n```go\nfunc (rc *RevisionController) GetRevisionList(ctx *gin.Context)\n```\nGetRevisionList godoc @Summary get revision list @Description get revision list @Tags Revision @Produce json @Param object\\_id query string true \"object id\" @Success 200 {object} handler.RespBody{data=\\[]schema.GetRevisionResp} @Router /answer/api/v1/revisions \\[get]\n\n```go\nfunc (rc *RevisionController) GetUnreviewedRevisionList(ctx *gin.Context)\n```\nGetUnreviewedRevisionList godoc @Summary get unreviewed revision list @Description get unreviewed revision list @Tags Revision @Produce json @Security ApiKeyAuth @Param page query string true \"page id\" @Success 200 {object} handler.RespBody{data=pager.PageModel{list=\\[]schema.GetUnreviewedRevisionResp}} @Router /answer/api/v1/revisions/unreviewed \\[get]\n\n```go\nfunc (rc *RevisionController) RevisionAudit(ctx *gin.Context)\n```\nRevisionAudit godoc @Summary revision audit @Description revision audit operation:approve or reject @Tags Revision @Produce json @Security ApiKeyAuth @Param data body schema.RevisionAuditReq true \"audit\" @Success 200 {object} handler.RespBody{} @Router /answer/api/v1/revisions/audit \\[put]\n\n```go\ntype SearchController struct {\n\t// contains filtered or unexported fields\n}\n```\nSearchController tag controller\n\n```go\nfunc NewSearchController(\n\tsearchService *content.SearchService,\n\tactionService *action.CaptchaService,\n) *SearchController\n```\nNewSearchController new controller\n\n```go\nfunc (sc *SearchController) Search(ctx *gin.Context)\n```\nSearch godoc @Summary search object @Description search object @Tags Search @Produce json @Security ApiKeyAuth @Param q query string true \"query string\" @Param order query string true \"order\" Enums(newest,active,score,relevance) @Success 200 {object} handler.RespBody{data=schema.SearchResp} @Router /answer/api/v1/search \\[get]\n\n```go\nfunc (sc *SearchController) SearchDesc(ctx *gin.Context)\n```\nSearchDesc get search description @Summary get search description @Description get search description @Tags Search @Produce json @Success 200 {object} handler.RespBody{data=schema.SearchResp} @Router /answer/api/v1/search/desc \\[get]\n\n```go\ntype SidebarController struct{}\n```\nSidebarController is the controller for the sidebar plugin.\n\n```go\nfunc NewSidebarController() *SidebarController\n```\nNewSidebarController creates a new instance of SidebarController.\n\n```go\nfunc (uc *SidebarController) GetSidebarConfig(ctx *gin.Context)\n```\nGetSidebarConfig retrieves the sidebar configuration from the registered sidebar plugins.\n\n```go\ntype SiteInfoController struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewSiteInfoController(siteInfoService siteinfo_common.SiteInfoCommonService) *SiteInfoController\n```\nNewSiteInfoController new site info controller.\n\n```go\nfunc (sc *SiteInfoController) GetManifestJson(ctx *gin.Context)\n```\nGetManifestJson get manifest.json\n\n```go\nfunc (sc *SiteInfoController) GetSiteInfo(ctx *gin.Context)\n```\nGetSiteInfo get site info @Summary get site info @Description get site info @Tags site @Produce json @Success 200 {object} handler.RespBody{data=schema.SiteInfoResp} @Router /answer/api/v1/siteinfo \\[get]\n\n```go\nfunc (sc *SiteInfoController) GetSiteLegalInfo(ctx *gin.Context)\n```\nGetSiteLegalInfo get site legal info @Summary get site legal info @Description get site legal info @Tags site @Param info\\_type query string true \"legal information type\" Enums(tos, privacy) @Produce json @Success 200 {object} handler.RespBody{data=schema.GetSiteLegalInfoResp} @Router /answer/api/v1/siteinfo/legal \\[get]\n\n```go\ntype TagController struct {\n\t// contains filtered or unexported fields\n}\n```\nTagController tag controller\n\n```go\nfunc NewTagController(\n\ttagService *tag.TagService,\n\ttagCommonService *tag_common.TagCommonService,\n\trankService *rank.RankService,\n) *TagController\n```\nNewTagController new controller\n\n```go\nfunc (tc *TagController) AddTag(ctx *gin.Context)\n```\nAddTag add tag @Summary add tag @Description add tag @Security ApiKeyAuth @Tags Tag @Accept json @Produce json @Param data body schema.AddTagReq true \"tag\" @Success 200 {object} handler.RespBody @Router /answer/api/v1/tag \\[post]\n\n```go\nfunc (tc *TagController) GetFollowingTags(ctx *gin.Context)\n```\nGetFollowingTags get following tag list @Summary get following tag list @Description get following tag list @Security ApiKeyAuth @Tags Tag @Produce json @Success 200 {object} handler.RespBody{data=\\[]schema.GetFollowingTagsResp} @Router /answer/api/v1/tags/following \\[get]\n\n```go\nfunc (tc *TagController) GetTagInfo(ctx *gin.Context)\n```\nGetTagInfo get tag one @Summary get tag one @Description get tag one @Tags Tag @Accept json @Produce json @Param tag\\_id query string true \"tag id\" @Param tag\\_name query string true \"tag name\" @Success 200 {object} handler.RespBody{data=schema.GetTagResp} @Router /answer/api/v1/tag \\[get]\n\n```go\nfunc (tc *TagController) GetTagSynonyms(ctx *gin.Context)\n```\nGetTagSynonyms get tag synonyms @Summary get tag synonyms @Description get tag synonyms @Tags Tag @Produce json @Param tag\\_id query int true \"tag id\" @Success 200 {object} handler.RespBody{data=schema.GetTagSynonymsResp} @Router /answer/api/v1/tag/synonyms \\[get]\n\n```go\nfunc (tc *TagController) GetTagWithPage(ctx *gin.Context)\n```\nGetTagWithPage get tag page @Summary get tag page @Description get tag page @Tags Tag @Produce json @Param page query int false \"page size\" @Param page\\_size query int false \"page size\" @Param slug\\_name query string false \"slug\\_name\" @Param query\\_cond query string false \"query condition\" Enums(popular, name, newest) @Success 200 {object} handler.RespBody{data=pager.PageModel{list=\\[]schema.GetTagPageResp}} @Router /answer/api/v1/tags/page \\[get]\n\n```go\nfunc (tc *TagController) GetTagsBySlugName(ctx *gin.Context)\n```\nGetTagsBySlugName get tags list @Summary get tags list @Description get tags list by slug name @Tags Tag @Produce json @Param tags query \\[]string false \"string collection\" collectionFormat(csv) @Success 200 {object} handler.RespBody{data=\\[]schema.GetTagBasicResp} @Router /answer/api/v1/tags \\[get]\n\n```go\nfunc (tc *TagController) MergeTag(ctx *gin.Context)\n```\nMergeTag merge tag @Summary merge tag @Description merge tag @Security ApiKeyAuth @Tags Tag @Accept json @Produce json @Param data body schema.AddTagReq true \"tag\" @Success 200 {object} handler.RespBody @Router /answer/api/v1/tag/merge \\[post]\n\n```go\nfunc (tc *TagController) RecoverTag(ctx *gin.Context)\n```\nRecoverTag recover delete tag @Summary recover delete tag @Description recover delete tag @Security ApiKeyAuth @Tags Tag @Accept json @Produce json @Param data body schema.RecoverTagReq true \"tag\" @Success 200 {object} handler.RespBody @Router /answer/api/v1/tag/recover \\[post]\n\n```go\nfunc (tc *TagController) RemoveTag(ctx *gin.Context)\n```\nRemoveTag delete tag @Summary delete tag @Description delete tag @Security ApiKeyAuth @Tags Tag @Accept json @Produce json @Param data body schema.RemoveTagReq true \"tag\" @Success 200 {object} handler.RespBody @Router /answer/api/v1/tag \\[delete]\n\n```go\nfunc (tc *TagController) SearchTagLike(ctx *gin.Context)\n```\nSearchTagLike get tag list @Summary get tag list @Description get tag list @Tags Tag @Produce json @Security ApiKeyAuth @Param tag query string false \"tag\" @Success 200 {object} handler.RespBody{data=\\[]schema.GetTagBasicResp} @Router /answer/api/v1/question/tags \\[get]\n\n```go\nfunc (tc *TagController) UpdateTag(ctx *gin.Context)\n```\nUpdateTag update tag @Summary update tag @Description update tag @Security ApiKeyAuth @Tags Tag @Accept json @Produce json @Param data body schema.UpdateTagReq true \"tag\" @Success 200 {object} handler.RespBody @Router /answer/api/v1/tag \\[put]\n\n```go\nfunc (tc *TagController) UpdateTagSynonym(ctx *gin.Context)\n```\nUpdateTagSynonym update tag @Summary update tag @Description update tag @Security ApiKeyAuth @Tags Tag @Accept json @Produce json @Param data body schema.UpdateTagSynonymReq true \"tag\" @Success 200 {object} handler.RespBody @Router /answer/api/v1/tag/synonym \\[put]\n\n```go\ntype TemplateController struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewTemplateController(\n\ttemplateRenderController *templaterender.TemplateRenderController,\n\tsiteInfoService siteinfo_common.SiteInfoCommonService,\n\teventQueueService event_queue.EventQueueService,\n\tuserService *content.UserService,\n\tquestionService *content.QuestionService,\n) *TemplateController\n```\nNewTemplateController new controller\n\n```go\nfunc (tc *TemplateController) Index(ctx *gin.Context)\n```\nIndex question list\n\n```go\nfunc (tc *TemplateController) OpenSearch(ctx *gin.Context)\n```\n\n```go\nfunc (tc *TemplateController) Page404(ctx *gin.Context)\n```\n\n```go\nfunc (tc *TemplateController) QuestionInfo(ctx *gin.Context)\n```\nQuestionInfo question and answers info\n\n```go\nfunc (tc *TemplateController) QuestionInfoRedirect(ctx *gin.Context, siteInfo *schema.TemplateSiteInfoResp, correctTitle bool) (jump bool, url string)\n```\n\n```go\nfunc (tc *TemplateController) QuestionList(ctx *gin.Context)\n```\n\n```go\nfunc (tc *TemplateController) SiteInfo(ctx *gin.Context) *schema.TemplateSiteInfoResp\n```\n\n```go\nfunc (tc *TemplateController) Sitemap(ctx *gin.Context)\n```\n\n```go\nfunc (tc *TemplateController) SitemapPage(ctx *gin.Context)\n```\n\n```go\nfunc (tc *TemplateController) TagInfo(ctx *gin.Context)\n```\nTagInfo taginfo\n\n```go\nfunc (tc *TemplateController) TagList(ctx *gin.Context)\n```\nTagList tags list\n\n```go\nfunc (tc *TemplateController) UserInfo(ctx *gin.Context)\n```\nUserInfo user info\n\n```go\ntype UploadController struct {\n\t// contains filtered or unexported fields\n}\n```\nUploadController upload controller\n\n```go\nfunc NewUploadController(uploaderService uploader.UploaderService) *UploadController\n```\nNewUploadController new controller\n\n```go\nfunc (uc *UploadController) PostRender(ctx *gin.Context)\n```\nPostRender render post content @Summary render post content @Description render post content @Tags Upload @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.PostRenderReq true \"PostRenderReq\" @Success 200 {object} handler.RespBody @Router /answer/api/v1/post/render \\[post]\n\n```go\nfunc (uc *UploadController) UploadFile(ctx *gin.Context)\n```\nUploadFile upload file @Summary upload file @Description upload file @Tags Upload @Accept multipart/form-data @Security ApiKeyAuth @Param source formData string true \"identify the source of the file upload\" Enums(post, post\\_attachment, avatar, branding) @Param file formData file true \"file\" @Success 200 {object} handler.RespBody{data=string} @Router /answer/api/v1/file \\[post]\n\n```go\ntype UserCenterController struct {\n\t// contains filtered or unexported fields\n}\n```\nUserCenterController comment controller\n\n```go\nfunc NewUserCenterController(\n\tuserCenterLoginService *user_external_login.UserCenterLoginService,\n\tsiteInfoService siteinfo_common.SiteInfoCommonService,\n) *UserCenterController\n```\nNewUserCenterController new controller\n\n```go\nfunc (uc *UserCenterController) UserCenterAdminFunctionAgent(ctx *gin.Context)\n```\nUserCenterAdminFunctionAgent user center admin function agent\n\n```go\nfunc (uc *UserCenterController) UserCenterAgent(ctx *gin.Context)\n```\nUserCenterAgent get user center agent info\n\n```go\nfunc (uc *UserCenterController) UserCenterLoginCallback(ctx *gin.Context)\n```\n\n```go\nfunc (uc *UserCenterController) UserCenterLoginRedirect(ctx *gin.Context)\n```\n\n```go\nfunc (uc *UserCenterController) UserCenterPersonalBranding(ctx *gin.Context)\n```\nUserCenterPersonalBranding get user center personal user info\n\n```go\nfunc (uc *UserCenterController) UserCenterSignUpCallback(ctx *gin.Context)\n```\n\n```go\nfunc (uc *UserCenterController) UserCenterSignUpRedirect(ctx *gin.Context)\n```\n\n```go\nfunc (uc *UserCenterController) UserCenterUserSettings(ctx *gin.Context)\n```\nUserCenterUserSettings user center user settings\n\n```go\ntype UserController struct {\n\t// contains filtered or unexported fields\n}\n```\nUserController user controller\n\n```go\nfunc NewUserController(\n\tauthService *auth.AuthService,\n\tuserService *content.UserService,\n\tactionService *action.CaptchaService,\n\temailService *export.EmailService,\n\tsiteInfoCommonService siteinfo_common.SiteInfoCommonService,\n\tuserNotificationConfigService *user_notification_config.UserNotificationConfigService,\n) *UserController\n```\nNewUserController new controller\n\n```go\nfunc (uc *UserController) ActionRecord(ctx *gin.Context)\n```\nActionRecord godoc @Summary ActionRecord @Description ActionRecord @Tags User @Param action query string true \"action\" Enums(login, e\\_mail, find\\_pass) @Security ApiKeyAuth @Success 200 {object} handler.RespBody{data=schema.ActionRecordResp} @Router /answer/api/v1/user/action/record \\[get]\n\n```go\nfunc (uc *UserController) GetOtherUserInfoByUsername(ctx *gin.Context)\n```\nGetOtherUserInfoByUsername godoc @Summary GetOtherUserInfoByUsername @Description GetOtherUserInfoByUsername @Tags User @Accept json @Produce json @Security ApiKeyAuth @Param username query string true \"username\" @Success 200 {object} handler.RespBody{data=schema.GetOtherUserInfoResp} @Router /answer/api/v1/personal/user/info \\[get]\n\n```go\nfunc (uc *UserController) GetUserInfoByUserID(ctx *gin.Context)\n```\nGetUserInfoByUserID get user info, if user no login response http code is 200, but user info is null @Summary GetUserInfoByUserID @Description get user info, if user no login response http code is 200, but user info is null @Tags User @Accept json @Produce json @Security ApiKeyAuth @Success 200 {object} handler.RespBody{data=schema.GetCurrentLoginUserInfoResp} @Router /answer/api/v1/user/info \\[get]\n\n```go\nfunc (uc *UserController) GetUserNotificationConfig(ctx *gin.Context)\n```\nGetUserNotificationConfig get user's notification config @Summary get user's notification config @Description get user's notification config @Tags User @Accept json @Produce json @Security ApiKeyAuth @Success 200 {object} handler.RespBody{data=schema.GetUserNotificationConfigResp} @Router /answer/api/v1/user/notification/config \\[post]\n\n```go\nfunc (uc *UserController) RetrievePassWord(ctx *gin.Context)\n```\nRetrievePassWord godoc @Summary RetrievePassWord @Description RetrievePassWord @Tags User @Accept  json @Produce  json @Param data body schema.UserRetrievePassWordRequest  true \"UserRetrievePassWordRequest\" @Success 200 {string} string \"\" @Router /answer/api/v1/user/password/reset \\[post]\n\n```go\nfunc (uc *UserController) SearchUserListByName(ctx *gin.Context)\n```\nSearchUserListByName godoc @Summary SearchUserListByName @Description SearchUserListByName @Tags User @Accept json @Produce json @Security ApiKeyAuth @Param username query string true \"username\" @Success 200 {object} handler.RespBody{data=schema.GetOtherUserInfoResp} @Router /answer/api/v1/user/info/search \\[get]\n\n```go\nfunc (uc *UserController) UpdateUserNotificationConfig(ctx *gin.Context)\n```\nUpdateUserNotificationConfig update user's notification config @Summary update user's notification config @Description update user's notification config @Tags User @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.UpdateUserNotificationConfigReq true \"UpdateUserNotificationConfigReq\" @Success 200 {object} handler.RespBody{} @Router /answer/api/v1/user/notification/config \\[put]\n\n```go\nfunc (uc *UserController) UseRePassWord(ctx *gin.Context)\n```\nUseRePassWord godoc @Summary UseRePassWord @Description UseRePassWord @Tags User @Accept  json @Produce  json @Param data body schema.UserRePassWordRequest  true \"UserRePassWordRequest\" @Success 200 {string} string \"\" @Router /answer/api/v1/user/password/replacement \\[post]\n\n```go\nfunc (uc *UserController) UserChangeEmailSendCode(ctx *gin.Context)\n```\nUserChangeEmailSendCode send email to the user email then change their email @Summary send email to the user email then change their email @Description send email to the user email then change their email @Security ApiKeyAuth @Tags User @Accept json @Produce json @Param data body schema.UserChangeEmailSendCodeReq true \"UserChangeEmailSendCodeReq\" @Success 200 {object} handler.RespBody{} @Router /answer/api/v1/user/email/change/code \\[post]\n\n```go\nfunc (uc *UserController) UserChangeEmailVerify(ctx *gin.Context)\n```\nUserChangeEmailVerify user change email verification @Summary user change email verification @Description user change email verification @Tags User @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.UserChangeEmailVerifyReq true \"UserChangeEmailVerifyReq\" @Success 200 {object} handler.RespBody{} @Router /answer/api/v1/user/email \\[put]\n\n```go\nfunc (uc *UserController) UserEmailLogin(ctx *gin.Context)\n```\nUserEmailLogin godoc @Summary UserEmailLogin @Description UserEmailLogin @Tags User @Accept json @Produce json @Param data body schema.UserEmailLoginReq true \"UserEmailLogin\" @Success 200 {object} handler.RespBody{data=schema.UserLoginResp} @Router /answer/api/v1/user/login/email \\[post]\n\n```go\nfunc (uc *UserController) UserLogout(ctx *gin.Context)\n```\nUserLogout user logout @Summary user logout @Description user logout @Security ApiKeyAuth @Tags User @Accept json @Produce json @Success 200 {object} handler.RespBody @Router /answer/api/v1/user/logout \\[get]\n\n```go\nfunc (uc *UserController) UserModifyPassWord(ctx *gin.Context)\n```\nUserModifyPassWord godoc @Summary UserModifyPassWord @Description UserModifyPassWord @Tags User @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.UserModifyPasswordReq  true \"UserModifyPasswordReq\" @Success 200 {object} handler.RespBody @Router /answer/api/v1/user/password \\[put]\n\n```go\nfunc (uc *UserController) UserRanking(ctx *gin.Context)\n```\nUserRanking get user ranking @Summary get user ranking @Description get user ranking @Tags User @Accept json @Produce json @Success 200 {object} handler.RespBody{data=schema.UserRankingResp} @Router /answer/api/v1/user/ranking \\[get]\n\n```go\nfunc (uc *UserController) UserRegisterByEmail(ctx *gin.Context)\n```\nUserRegisterByEmail godoc @Summary UserRegisterByEmail @Description UserRegisterByEmail @Tags User @Accept json @Produce json @Param data body schema.UserRegisterReq true \"UserRegisterReq\" @Success 200 {object} handler.RespBody{data=schema.UserLoginResp} @Router /answer/api/v1/user/register/email \\[post]\n\n```go\nfunc (uc *UserController) UserStaff(ctx *gin.Context)\n```\nUserStaff get user staff @Summary get user staff @Description get user staff @Tags User @Accept json @Produce json @Param username query string true \"username\" @Param page\\_size query string true \"page\\_size\" @Success 200 {object} handler.RespBody{data=schema.GetUserStaffResp} @Router /answer/api/v1/user/staff \\[get]\n\n```go\nfunc (uc *UserController) UserUnsubscribeNotification(ctx *gin.Context)\n```\nUserUnsubscribeNotification unsubscribe notification @Summary unsubscribe notification @Description unsubscribe notification @Tags User @Accept json @Produce json @Param data body schema.UserUnsubscribeNotificationReq true \"UserUnsubscribeNotificationReq\" @Success 200 {object} handler.RespBody{} @Router /answer/api/v1/user/notification/unsubscribe \\[put]\n\n```go\nfunc (uc *UserController) UserUpdateInfo(ctx *gin.Context)\n```\nUserUpdateInfo update user info @Summary UserUpdateInfo update user info @Description UserUpdateInfo update user info @Tags User @Accept json @Produce json @Security ApiKeyAuth @Param Authorization header string true \"access-token\" @Param data body schema.UpdateInfoRequest true \"UpdateInfoRequest\" @Success 200 {object} handler.RespBody @Router /answer/api/v1/user/info \\[put]\n\n```go\nfunc (uc *UserController) UserUpdateInterface(ctx *gin.Context)\n```\nUserUpdateInterface update user interface config @Summary UserUpdateInterface update user interface config @Description UserUpdateInterface update user interface config @Tags User @Accept json @Produce json @Security ApiKeyAuth @Param Authorization header string true \"access-token\" @Param data body schema.UpdateUserInterfaceRequest true \"UpdateInfoRequest\" @Success 200 {object} handler.RespBody @Router /answer/api/v1/user/interface \\[put]\n\n```go\nfunc (uc *UserController) UserVerifyEmail(ctx *gin.Context)\n```\nUserVerifyEmail godoc @Summary UserVerifyEmail @Description UserVerifyEmail @Tags User @Accept json @Produce json @Param code query string true \"code\" default() @Success 200 {object} handler.RespBody{data=schema.UserLoginResp} @Router /answer/api/v1/user/email/verification \\[post]\n\n```go\nfunc (uc *UserController) UserVerifyEmailSend(ctx *gin.Context)\n```\nUserVerifyEmailSend godoc @Summary UserVerifyEmailSend @Description UserVerifyEmailSend @Tags User @Accept json @Produce json @Security ApiKeyAuth @Param captcha\\_id query string false \"captcha\\_id\"  default() @Param captcha\\_code query string false \"captcha\\_code\"  default() @Success 200 {string} string \"\" @Router /answer/api/v1/user/email/verification/send \\[post]\n\n```go\ntype UserPluginController struct {\n\t// contains filtered or unexported fields\n}\n```\nUserPluginController role controller\n\n```go\nfunc NewUserPluginController(pluginCommonService *plugin_common.PluginCommonService) *UserPluginController\n```\nNewUserPluginController new controller\n\n```go\nfunc (pc *UserPluginController) GetUserPluginConfig(ctx *gin.Context)\n```\nGetUserPluginConfig get user plugin config @Summary get user plugin config @Description get user plugin config @Tags UserPlugin @Security ApiKeyAuth @Produce  json @Param plugin\\_slug\\_name query string true \"plugin\\_slug\\_name\" @Success 200 {object} handler.RespBody{data=schema.GetPluginConfigResp} @Router /answer/api/v1/user/plugin/config \\[get]\n\n```go\nfunc (pc *UserPluginController) GetUserPluginList(ctx *gin.Context)\n```\nGetUserPluginList get plugin list that used for user. @Summary get plugin list that used for user. @Description get plugin list that used for user. @Tags UserPlugin @Security ApiKeyAuth @Accept  json @Produce  json @Success 200 {object} handler.RespBody{data=\\[]schema.GetUserPluginListResp} @Router /answer/api/v1/user/plugin/configs \\[get]\n\n```go\nfunc (pc *UserPluginController) UpdatePluginUserConfig(ctx *gin.Context)\n```\nUpdatePluginUserConfig update user plugin config @Summary update user plugin config @Description update user plugin config @Tags UserPlugin @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.UpdateUserPluginConfigReq true \"UpdatePluginConfigReq\" @Success 200 {object} handler.RespBody @Router /answer/api/v1/user/plugin/config \\[put]\n\n```go\ntype VoteController struct {\n\tVoteService *content.VoteService\n\t// contains filtered or unexported fields\n}\n```\nVoteController activity controller\n\n```go\nfunc NewVoteController(\n\tvoteService *content.VoteService,\n\trankService *rank.RankService,\n\tactionService *action.CaptchaService,\n) *VoteController\n```\nNewVoteController new controller\n\n```go\nfunc (vc *VoteController) UserVotes(ctx *gin.Context)\n```\nUserVotes user votes @Summary get user personal votes @Description get user personal votes @Tags Activity @Accept json @Produce json @Security ApiKeyAuth @Param page query int false \"page size\" @Param page\\_size query int false \"page size\" @Success 200 {object} handler.RespBody{data=pager.PageModel{list=\\[]schema.GetVoteWithPageResp}} @Router /answer/api/v1/personal/vote/page \\[get]\n\n```go\nfunc (vc *VoteController) VoteDown(ctx *gin.Context)\n```\nVoteDown godoc @Summary vote down @Description add vote @Tags Activity @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.VoteReq true \"vote\" @Success 200 {object} handler.RespBody{data=schema.VoteResp} @Router /answer/api/v1/vote/down \\[post]\n\n```go\nfunc (vc *VoteController) VoteUp(ctx *gin.Context)\n```\nVoteUp godoc @Summary vote up @Description add vote @Tags Activity @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.VoteReq true \"vote\" @Success 200 {object} handler.RespBody{data=schema.VoteResp} @Router /answer/api/v1/vote/up \\[post]\n\n","path":"github.com/apache/answer/internal/controller","name":"controller","synopsis":"","isRedistributable":true}
