{"modulePath":"github.com/apache/answer","version":"v1.7.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package controller_admin\n\n## Variables\n\n```go\nvar ProviderSetController = wire.NewSet(\n\tNewUserAdminController,\n\tNewThemeController,\n\tNewSiteInfoController,\n\tNewRoleController,\n\tNewPluginController,\n\tNewBadgeController,\n)\n```\nProviderSetController is controller providers.\n\n## Types\n\n```go\ntype BadgeController struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewBadgeController(badgeService *badge.BadgeService) *BadgeController\n```\n\n```go\nfunc (b *BadgeController) GetBadgeList(ctx *gin.Context)\n```\nGetBadgeList list all badges by page @Summary list all badges by page @Description list all badges by page @Tags AdminBadge @Accept json @Produce json @Security ApiKeyAuth @Param page query int false \"page\" @Param page\\_size query int false \"page size\" @Param status query string false \"badge status\" Enums(, active, inactive) @Param q query string false \"search param\" @Success 200 {object} handler.RespBody{data=\\[]schema.GetBadgeListPagedResp} @Router /answer/admin/api/badges \\[get]\n\n```go\nfunc (b *BadgeController) UpdateBadgeStatus(ctx *gin.Context)\n```\nUpdateBadgeStatus update badge status @Summary update badge status @Description update badge status @Tags AdminBadge @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.UpdateBadgeStatusReq true \"UpdateBadgeStatusReq\" @Success 200 {object} handler.RespBody @Router /answer/admin/api/badge/status \\[put]\n\n```go\ntype PluginController struct {\n\t// contains filtered or unexported fields\n}\n```\nPluginController role controller\n\n```go\nfunc NewPluginController(pluginCommonService *plugin_common.PluginCommonService) *PluginController\n```\nNewPluginController new controller\n\n```go\nfunc (pc *PluginController) GetAllPluginStatus(ctx *gin.Context)\n```\nGetAllPluginStatus get all plugins status @Summary get all plugins status @Description get all plugins status @Tags Plugin @Accept  json @Produce  json @Success 200 {object} handler.RespBody{data=\\[]schema.GetPluginListResp} @Router /answer/api/v1/plugin/status \\[get]\n\n```go\nfunc (pc *PluginController) GetPluginConfig(ctx *gin.Context)\n```\nGetPluginConfig get plugin config @Summary get plugin config @Description get plugin config @Tags AdminPlugin @Security ApiKeyAuth @Produce  json @Param plugin\\_slug\\_name query string true \"plugin\\_slug\\_name\" @Success 200 {object} handler.RespBody{data=schema.GetPluginConfigResp} @Router /answer/admin/api/plugin/config \\[get]\n\n```go\nfunc (pc *PluginController) GetPluginList(ctx *gin.Context)\n```\nGetPluginList get plugin list @Summary get plugin list @Description get plugin list @Tags AdminPlugin @Security ApiKeyAuth @Accept  json @Produce  json @Param status query string false \"status: active/inactive\" @Param have\\_config query boolean false \"have config\" @Success 200 {object} handler.RespBody{data=\\[]schema.GetPluginListResp} @Router /answer/admin/api/plugins \\[get]\n\n```go\nfunc (pc *PluginController) UpdatePluginConfig(ctx *gin.Context)\n```\nUpdatePluginConfig update plugin config @Summary update plugin config @Description update plugin config @Tags AdminPlugin @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.UpdatePluginConfigReq true \"UpdatePluginConfigReq\" @Success 200 {object} handler.RespBody @Router /answer/admin/api/plugin/config \\[put]\n\n```go\nfunc (pc *PluginController) UpdatePluginStatus(ctx *gin.Context)\n```\nUpdatePluginStatus update plugin status @Summary update plugin status @Description update plugin status @Tags AdminPlugin @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.UpdatePluginStatusReq true \"UpdatePluginStatusReq\" @Success 200 {object} handler.RespBody @Router /answer/admin/api/plugin/status \\[put]\n\n```go\ntype RoleController struct {\n\t// contains filtered or unexported fields\n}\n```\nRoleController role controller\n\n```go\nfunc NewRoleController(roleService *service.RoleService) *RoleController\n```\nNewRoleController new controller\n\n```go\nfunc (rc *RoleController) GetRoleList(ctx *gin.Context)\n```\nGetRoleList get role list @Summary get role list @Description get role list @Security ApiKeyAuth @Tags admin @Produce json @Success 200 {object} handler.RespBody{data=\\[]schema.GetRoleResp} @Router /answer/admin/api/roles \\[get]\n\n```go\ntype SiteInfoController struct {\n\t// contains filtered or unexported fields\n}\n```\nSiteInfoController site info controller\n\n```go\nfunc NewSiteInfoController(siteInfoService *siteinfo.SiteInfoService) *SiteInfoController\n```\nNewSiteInfoController new site info controller\n\n```go\nfunc (sc *SiteInfoController) GetCss(ctx *gin.Context)\n```\nGetCss get site custom CSS @Summary get site custom CSS @Description get site custom CSS @Tags site @Produce text/css @Success 200 {string} css \"\" @Router /custom.css \\[get]\n\n```go\nfunc (sc *SiteInfoController) GetGeneral(ctx *gin.Context)\n```\nGetGeneral get site general information @Summary get site general information @Description get site general information @Security ApiKeyAuth @Tags admin @Produce json @Success 200 {object} handler.RespBody{data=schema.SiteGeneralResp} @Router /answer/admin/api/siteinfo/general \\[get]\n\n```go\nfunc (sc *SiteInfoController) GetInterface(ctx *gin.Context)\n```\nGetInterface get site interface @Summary get site interface @Description get site interface @Security ApiKeyAuth @Tags admin @Produce json @Success 200 {object} handler.RespBody{data=schema.SiteInterfaceResp} @Router /answer/admin/api/siteinfo/interface \\[get]\n\n```go\nfunc (sc *SiteInfoController) GetPrivilegesConfig(ctx *gin.Context)\n```\nGetPrivilegesConfig get privileges config @Summary GetPrivilegesConfig get privileges config @Description GetPrivilegesConfig get privileges config @Security ApiKeyAuth @Tags admin @Produce json @Success 200 {object} handler.RespBody{data=schema.GetPrivilegesConfigResp} @Router /answer/admin/api/setting/privileges \\[get]\n\n```go\nfunc (sc *SiteInfoController) GetRobots(ctx *gin.Context)\n```\nGetRobots get site robots information @Summary get site robots information @Description get site robots information @Tags site @Produce json @Success 200 {string} txt \"\" @Router /robots.txt \\[get]\n\n```go\nfunc (sc *SiteInfoController) GetSMTPConfig(ctx *gin.Context)\n```\nGetSMTPConfig get smtp config @Summary GetSMTPConfig get smtp config @Description GetSMTPConfig get smtp config @Security ApiKeyAuth @Tags admin @Produce json @Success 200 {object} handler.RespBody{data=schema.GetSMTPConfigResp} @Router /answer/admin/api/setting/smtp \\[get]\n\n```go\nfunc (sc *SiteInfoController) GetSeo(ctx *gin.Context)\n```\nGetSeo get site seo information @Summary get site seo information @Description get site seo information @Security ApiKeyAuth @Tags admin @Produce json @Success 200 {object} handler.RespBody{data=schema.SiteSeoResp} @Router /answer/admin/api/siteinfo/seo \\[get]\n\n```go\nfunc (sc *SiteInfoController) GetSiteBranding(ctx *gin.Context)\n```\nGetSiteBranding get site interface @Summary get site interface @Description get site interface @Security ApiKeyAuth @Tags admin @Produce json @Success 200 {object} handler.RespBody{data=schema.SiteBrandingResp} @Router /answer/admin/api/siteinfo/branding \\[get]\n\n```go\nfunc (sc *SiteInfoController) GetSiteCustomCssHTML(ctx *gin.Context)\n```\nGetSiteCustomCssHTML get site info custom html css config @Summary get site info custom html css config @Description get site info custom html css config @Security ApiKeyAuth @Tags admin @Produce json @Success 200 {object} handler.RespBody{data=schema.SiteCustomCssHTMLResp} @Router /answer/admin/api/siteinfo/custom-css-html \\[get]\n\n```go\nfunc (sc *SiteInfoController) GetSiteLegal(ctx *gin.Context)\n```\nGetSiteLegal Set the legal information for the site @Summary Set the legal information for the site @Description Set the legal information for the site @Security ApiKeyAuth @Tags admin @Produce json @Success 200 {object} handler.RespBody{data=schema.SiteLegalResp} @Router /answer/admin/api/siteinfo/legal \\[get]\n\n```go\nfunc (sc *SiteInfoController) GetSiteLogin(ctx *gin.Context)\n```\nGetSiteLogin get site info login config @Summary get site info login config @Description get site info login config @Security ApiKeyAuth @Tags admin @Produce json @Success 200 {object} handler.RespBody{data=schema.SiteLoginResp} @Router /answer/admin/api/siteinfo/login \\[get]\n\n```go\nfunc (sc *SiteInfoController) GetSiteTheme(ctx *gin.Context)\n```\nGetSiteTheme get site info theme config @Summary get site info theme config @Description get site info theme config @Security ApiKeyAuth @Tags admin @Produce json @Success 200 {object} handler.RespBody{data=schema.SiteThemeResp} @Router /answer/admin/api/siteinfo/theme \\[get]\n\n```go\nfunc (sc *SiteInfoController) GetSiteUsers(ctx *gin.Context)\n```\nGetSiteUsers get site user config @Summary get site user config @Description get site user config @Security ApiKeyAuth @Tags admin @Produce json @Success 200 {object} handler.RespBody{data=schema.SiteUsersResp} @Router /answer/admin/api/siteinfo/users \\[get]\n\n```go\nfunc (sc *SiteInfoController) GetSiteWrite(ctx *gin.Context)\n```\nGetSiteWrite get site interface @Summary get site interface @Description get site interface @Security ApiKeyAuth @Tags admin @Produce json @Success 200 {object} handler.RespBody{data=schema.SiteWriteResp} @Router /answer/admin/api/siteinfo/write \\[get]\n\n```go\nfunc (sc *SiteInfoController) SaveSiteTheme(ctx *gin.Context)\n```\nSaveSiteTheme update site custom css html config @Summary update site custom css html config @Description update site custom css html config @Security ApiKeyAuth @Tags admin @Produce json @Param data body schema.SiteThemeReq true \"login info\" @Success 200 {object} handler.RespBody{} @Router /answer/admin/api/siteinfo/theme \\[put]\n\n```go\nfunc (sc *SiteInfoController) UpdateBranding(ctx *gin.Context)\n```\nUpdateBranding update site branding @Summary update site info branding @Description update site info branding @Security ApiKeyAuth @Tags admin @Produce json @Param data body schema.SiteBrandingReq true \"branding info\" @Success 200 {object} handler.RespBody{} @Router /answer/admin/api/siteinfo/branding \\[put]\n\n```go\nfunc (sc *SiteInfoController) UpdateGeneral(ctx *gin.Context)\n```\nUpdateGeneral update site general information @Summary update site general information @Description update site general information @Security ApiKeyAuth @Tags admin @Produce json @Param data body schema.SiteGeneralReq true \"general\" @Success 200 {object} handler.RespBody{} @Router /answer/admin/api/siteinfo/general \\[put]\n\n```go\nfunc (sc *SiteInfoController) UpdateInterface(ctx *gin.Context)\n```\nUpdateInterface update site interface @Summary update site info interface @Description update site info interface @Security ApiKeyAuth @Tags admin @Produce json @Param data body schema.SiteInterfaceReq true \"general\" @Success 200 {object} handler.RespBody{} @Router /answer/admin/api/siteinfo/interface \\[put]\n\n```go\nfunc (sc *SiteInfoController) UpdatePrivilegesConfig(ctx *gin.Context)\n```\nUpdatePrivilegesConfig update privileges config @Summary update privileges config @Description update privileges config @Security ApiKeyAuth @Tags admin @Produce json @Param data body schema.UpdatePrivilegesConfigReq true \"config\" @Success 200 {object} handler.RespBody{} @Router /answer/admin/api/setting/privileges \\[put]\n\n```go\nfunc (sc *SiteInfoController) UpdateSMTPConfig(ctx *gin.Context)\n```\nUpdateSMTPConfig update smtp config @Summary update smtp config @Description update smtp config @Security ApiKeyAuth @Tags admin @Produce json @Param data body schema.UpdateSMTPConfigReq true \"smtp config\" @Success 200 {object} handler.RespBody{} @Router /answer/admin/api/setting/smtp \\[put]\n\n```go\nfunc (sc *SiteInfoController) UpdateSeo(ctx *gin.Context)\n```\nUpdateSeo update site seo information @Summary update site seo information @Description update site seo information @Security ApiKeyAuth @Tags admin @Produce json @Param data body schema.SiteSeoReq true \"seo\" @Success 200 {object} handler.RespBody{} @Router /answer/admin/api/siteinfo/seo \\[put]\n\n```go\nfunc (sc *SiteInfoController) UpdateSiteCustomCssHTML(ctx *gin.Context)\n```\nUpdateSiteCustomCssHTML update site custom css html config @Summary update site custom css html config @Description update site custom css html config @Security ApiKeyAuth @Tags admin @Produce json @Param data body schema.SiteCustomCssHTMLReq true \"login info\" @Success 200 {object} handler.RespBody{} @Router /answer/admin/api/siteinfo/custom-css-html \\[put]\n\n```go\nfunc (sc *SiteInfoController) UpdateSiteLegal(ctx *gin.Context)\n```\nUpdateSiteLegal update site legal info @Summary update site legal info @Description update site legal info @Security ApiKeyAuth @Tags admin @Produce json @Param data body schema.SiteLegalReq true \"write info\" @Success 200 {object} handler.RespBody{} @Router /answer/admin/api/siteinfo/legal \\[put]\n\n```go\nfunc (sc *SiteInfoController) UpdateSiteLogin(ctx *gin.Context)\n```\nUpdateSiteLogin update site login @Summary update site login @Description update site login @Security ApiKeyAuth @Tags admin @Produce json @Param data body schema.SiteLoginReq true \"login info\" @Success 200 {object} handler.RespBody{} @Router /answer/admin/api/siteinfo/login \\[put]\n\n```go\nfunc (sc *SiteInfoController) UpdateSiteUsers(ctx *gin.Context)\n```\nUpdateSiteUsers update site config about users @Summary update site info config about users @Description update site info config about users @Security ApiKeyAuth @Tags admin @Produce json @Param data body schema.SiteUsersReq true \"users info\" @Success 200 {object} handler.RespBody{} @Router /answer/admin/api/siteinfo/users \\[put]\n\n```go\nfunc (sc *SiteInfoController) UpdateSiteWrite(ctx *gin.Context)\n```\nUpdateSiteWrite update site write info @Summary update site write info @Description update site write info @Security ApiKeyAuth @Tags admin @Produce json @Param data body schema.SiteWriteReq true \"write info\" @Success 200 {object} handler.RespBody{} @Router /answer/admin/api/siteinfo/write \\[put]\n\n```go\ntype ThemeController struct{}\n```\n\n```go\nfunc NewThemeController() *ThemeController\n```\nNewThemeController new theme controller.\n\n```go\nfunc (t *ThemeController) GetThemeOptions(ctx *gin.Context)\n```\nGetThemeOptions godoc @Summary Get theme options @Description Get theme options @Security ApiKeyAuth @Tags admin @Produce json @Success 200 {object} handler.RespBody{} @Router /answer/admin/api/theme/options \\[get]\n\n```go\ntype UserAdminController struct {\n\t// contains filtered or unexported fields\n}\n```\nUserAdminController user controller\n\n```go\nfunc NewUserAdminController(userService *user_admin.UserAdminService) *UserAdminController\n```\nNewUserAdminController new controller\n\n```go\nfunc (uc *UserAdminController) AddUser(ctx *gin.Context)\n```\nAddUser add user @Summary add user @Description add user @Security ApiKeyAuth @Tags admin @Accept json @Produce json @Param data body schema.AddUserReq true \"user\" @Success 200 {object} handler.RespBody @Router /answer/admin/api/user \\[post]\n\n```go\nfunc (uc *UserAdminController) AddUsers(ctx *gin.Context)\n```\nAddUsers add users @Summary add users @Description add users @Security ApiKeyAuth @Tags admin @Accept json @Produce json @Param data body schema.AddUsersReq true \"user\" @Success 200 {object} handler.RespBody @Router /answer/admin/api/users \\[post]\n\n```go\nfunc (uc *UserAdminController) DeletePermanently(ctx *gin.Context)\n```\nDeletePermanently delete permanently @Summary delete permanently @Description delete permanently @Security ApiKeyAuth @Tags admin @Accept json @Produce json @Param data body schema.DeletePermanentlyReq true \"DeletePermanentlyReq\" @Success 200 {object} handler.RespBody @Router /answer/admin/api/delete/permanently \\[delete]\n\n```go\nfunc (uc *UserAdminController) EditUserProfile(ctx *gin.Context)\n```\nEditUserProfile edit user profile @Summary edit user profile @Description edit user profile @Security ApiKeyAuth @Tags admin @Accept json @Produce json @Param data body schema.EditUserProfileReq true \"user\" @Success 200 {object} handler.RespBody @Router /answer/admin/api/user/profile \\[put]\n\n```go\nfunc (uc *UserAdminController) GetUserActivation(ctx *gin.Context)\n```\nGetUserActivation get user activation @Summary get user activation @Description get user activation @Security ApiKeyAuth @Tags admin @Produce json @Param user\\_id query string true \"user id\" @Success 200 {object} handler.RespBody{data=schema.GetUserActivationResp} @Router /answer/admin/api/user/activation \\[get]\n\n```go\nfunc (uc *UserAdminController) GetUserPage(ctx *gin.Context)\n```\nGetUserPage get user page @Summary get user page @Description get user page @Security ApiKeyAuth @Tags admin @Produce json @Param page query int false \"page size\" @Param page\\_size query int false \"page size\" @Param query query string false \"search query: email, username or id:\\[id]\" @Param staff query bool false \"staff user\" @Param status query string false \"user status\" Enums(suspended, deleted, inactive) @Success 200 {object} handler.RespBody{data=pager.PageModel{records=\\[]schema.GetUserPageResp}} @Router /answer/admin/api/users/page \\[get]\n\n```go\nfunc (uc *UserAdminController) SendUserActivation(ctx *gin.Context)\n```\nSendUserActivation send user activation @Summary send user activation @Description send user activation @Security ApiKeyAuth @Tags admin @Produce json @Param data body schema.SendUserActivationReq true \"SendUserActivationReq\" @Success 200 {object} handler.RespBody @Router /answer/admin/api/users/activation \\[post]\n\n```go\nfunc (uc *UserAdminController) UpdateUserPassword(ctx *gin.Context)\n```\nUpdateUserPassword update user password @Summary update user password @Description update user password @Security ApiKeyAuth @Tags admin @Accept json @Produce json @Param data body schema.UpdateUserPasswordReq true \"user\" @Success 200 {object} handler.RespBody @Router /answer/admin/api/user/password \\[put]\n\n```go\nfunc (uc *UserAdminController) UpdateUserRole(ctx *gin.Context)\n```\nUpdateUserRole update user role @Summary update user role @Description update user role @Security ApiKeyAuth @Tags admin @Accept json @Produce json @Param data body schema.UpdateUserRoleReq true \"user\" @Success 200 {object} handler.RespBody @Router /answer/admin/api/user/role \\[put]\n\n```go\nfunc (uc *UserAdminController) UpdateUserStatus(ctx *gin.Context)\n```\nUpdateUserStatus update user @Summary update user @Description update user @Security ApiKeyAuth @Tags admin @Accept json @Produce json @Param data body schema.UpdateUserStatusReq true \"user\" @Success 200 {object} handler.RespBody @Router /answer/admin/api/user/status \\[put]\n\n","path":"github.com/apache/answer/internal/controller_admin","name":"controller_admin","synopsis":"","isRedistributable":true}
