Documentation ¶
Index ¶
- Variables
- type ReportController
- type SiteInfoController
- func (sc *SiteInfoController) GetGeneral(ctx *gin.Context)
- func (sc *SiteInfoController) GetInterface(ctx *gin.Context)
- func (sc *SiteInfoController) GetSMTPConfig(ctx *gin.Context)
- func (sc *SiteInfoController) GetSiteBranding(ctx *gin.Context)
- func (sc *SiteInfoController) GetSiteLegal(ctx *gin.Context)
- func (sc *SiteInfoController) GetSiteWrite(ctx *gin.Context)
- func (sc *SiteInfoController) UpdateBranding(ctx *gin.Context)
- func (sc *SiteInfoController) UpdateGeneral(ctx *gin.Context)
- func (sc *SiteInfoController) UpdateInterface(ctx *gin.Context)
- func (sc *SiteInfoController) UpdateSMTPConfig(ctx *gin.Context)
- func (sc *SiteInfoController) UpdateSiteLegal(ctx *gin.Context)
- func (sc *SiteInfoController) UpdateSiteWrite(ctx *gin.Context)
- type ThemeController
- type UserBackyardController
Constants ¶
This section is empty.
Variables ¶
var ProviderSetController = wire.NewSet( NewReportController, NewUserBackyardController, NewThemeController, NewSiteInfoController, )
ProviderSetController is controller providers.
Functions ¶
This section is empty.
Types ¶
type ReportController ¶
type ReportController struct {
// contains filtered or unexported fields
}
ReportController report controller
func NewReportController ¶
func NewReportController(reportService *report_backyard.ReportBackyardService) *ReportController
NewReportController new controller
func (*ReportController) Handle ¶
func (rc *ReportController) Handle(ctx *gin.Context)
Handle godoc @Summary handle flag @Description handle flag @Security ApiKeyAuth @Tags admin @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.ReportHandleReq true "flag" @Success 200 {object} handler.RespBody @Router /answer/admin/api/report/ [put]
func (*ReportController) ListReportPage ¶
func (rc *ReportController) ListReportPage(ctx *gin.Context)
ListReportPage godoc @Summary list report page @Description list report records @Security ApiKeyAuth @Tags admin @Accept json @Produce json @Security ApiKeyAuth @Param status query string true "status" Enums(pending, completed) @Param object_type query string true "object_type" Enums(all, question,answer,comment) @Param page query int false "page size" @Param page_size query int false "page size" @Success 200 {object} handler.RespBody @Router /answer/admin/api/reports/page [get]
type SiteInfoController ¶
type SiteInfoController struct {
// contains filtered or unexported fields
}
SiteInfoController site info controller
func NewSiteInfoController ¶
func NewSiteInfoController(siteInfoService *siteinfo.SiteInfoService) *SiteInfoController
NewSiteInfoController new site info controller
func (*SiteInfoController) GetGeneral ¶
func (sc *SiteInfoController) GetGeneral(ctx *gin.Context)
GetGeneral 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]
func (*SiteInfoController) GetInterface ¶
func (sc *SiteInfoController) GetInterface(ctx *gin.Context)
GetInterface 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]
func (*SiteInfoController) GetSMTPConfig ¶
func (sc *SiteInfoController) GetSMTPConfig(ctx *gin.Context)
GetSMTPConfig 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]
func (*SiteInfoController) GetSiteBranding ¶ added in v0.4.0
func (sc *SiteInfoController) GetSiteBranding(ctx *gin.Context)
GetSiteBranding 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]
func (*SiteInfoController) GetSiteLegal ¶ added in v0.4.0
func (sc *SiteInfoController) GetSiteLegal(ctx *gin.Context)
GetSiteLegal 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]
func (*SiteInfoController) GetSiteWrite ¶ added in v0.4.0
func (sc *SiteInfoController) GetSiteWrite(ctx *gin.Context)
GetSiteWrite 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]
func (*SiteInfoController) UpdateBranding ¶ added in v0.4.0
func (sc *SiteInfoController) UpdateBranding(ctx *gin.Context)
UpdateBranding 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]
func (*SiteInfoController) UpdateGeneral ¶
func (sc *SiteInfoController) UpdateGeneral(ctx *gin.Context)
UpdateGeneral 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]
func (*SiteInfoController) UpdateInterface ¶
func (sc *SiteInfoController) UpdateInterface(ctx *gin.Context)
UpdateInterface 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]
func (*SiteInfoController) UpdateSMTPConfig ¶
func (sc *SiteInfoController) UpdateSMTPConfig(ctx *gin.Context)
UpdateSMTPConfig 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]
func (*SiteInfoController) UpdateSiteLegal ¶ added in v0.4.0
func (sc *SiteInfoController) UpdateSiteLegal(ctx *gin.Context)
UpdateSiteLegal 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]
func (*SiteInfoController) UpdateSiteWrite ¶ added in v0.4.0
func (sc *SiteInfoController) UpdateSiteWrite(ctx *gin.Context)
UpdateSiteWrite 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]
type ThemeController ¶
type ThemeController struct{}
func NewThemeController ¶
func NewThemeController() *ThemeController
NewThemeController new theme controller.
func (*ThemeController) GetThemeOptions ¶
func (t *ThemeController) GetThemeOptions(ctx *gin.Context)
GetThemeOptions 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]
type UserBackyardController ¶
type UserBackyardController struct {
// contains filtered or unexported fields
}
UserBackyardController user controller
func NewUserBackyardController ¶
func NewUserBackyardController(userService *user_backyard.UserBackyardService) *UserBackyardController
NewUserBackyardController new controller
func (*UserBackyardController) GetUserPage ¶
func (uc *UserBackyardController) GetUserPage(ctx *gin.Context)
GetUserPage 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 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]
func (*UserBackyardController) UpdateUserStatus ¶
func (uc *UserBackyardController) UpdateUserStatus(ctx *gin.Context)
UpdateUserStatus 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]