templaterender

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSetTemplateRenderController = wire.NewSet(
	NewTemplateRenderController,
)

ProviderSetTemplateRenderController is template render controller providers.

Functions

func Paginator

func Paginator(page, pageSize int, nums int64) *schema.Paginator

Paginator page page : now page pageSize : Number per page nums : Total Returns the contents of the page in the format of 1, 2, 3, 4, and 5. If the contents are less than 5 pages, the page number is returned

Types

type TemplateRenderController

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

func NewTemplateRenderController

func NewTemplateRenderController(
	questionService *content.QuestionService,
	userService *content.UserService,
	tagService *tag.TagService,
	answerService *content.AnswerService,
	commentService *comment.CommentService,
	siteInfoService siteinfo_common.SiteInfoCommonService,
	questionRepo questioncommon.QuestionRepo,
) *TemplateRenderController

func (*TemplateRenderController) AnswerDetail added in v1.3.1

func (t *TemplateRenderController) AnswerDetail(ctx context.Context, id string) (*schema.AnswerInfo, error)

func (*TemplateRenderController) AnswerList

func (*TemplateRenderController) CommentList

func (t *TemplateRenderController) CommentList(
	ctx context.Context,
	objectIDs []string,
) (
	comments map[string][]*schema.GetCommentResp,
	err error,
)

func (*TemplateRenderController) Index

func (*TemplateRenderController) QuestionDetail

func (t *TemplateRenderController) QuestionDetail(ctx *gin.Context, id string) (resp *schema.QuestionInfoResp, err error)

func (*TemplateRenderController) Sitemap

func (t *TemplateRenderController) Sitemap(ctx *gin.Context)

func (*TemplateRenderController) SitemapPage

func (t *TemplateRenderController) SitemapPage(ctx *gin.Context, page int) error

func (*TemplateRenderController) TagInfo

func (q *TemplateRenderController) TagInfo(ctx context.Context, req *schema.GetTamplateTagInfoReq) (resp *schema.GetTagResp, questionList []*schema.QuestionPageResp, questionCount int64, err error)

func (*TemplateRenderController) TagList

func (*TemplateRenderController) UserInfo

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL