client

package
v0.0.0-...-c605425 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HomeApi

type HomeApi struct {
	UtilApi
}

func (*HomeApi) CountPostByTag

func (h *HomeApi) CountPostByTag(ctx *gin.Context) (int, error)

func (*HomeApi) Index

func (h *HomeApi) Index(ctx *gin.Context)
func (h *HomeApi) ListLinks(ctx *gin.Context) []*models.Link

func (*HomeApi) MaxCommentPost

func (h *HomeApi) MaxCommentPost(ctx *gin.Context) []*models.Post

func (*HomeApi) MaxReadPost

func (h *HomeApi) MaxReadPost(ctx *gin.Context) []*models.Post

func (*HomeApi) PublishTags

func (h *HomeApi) PublishTags(ctx *gin.Context) []*models.Tag

type IUtilApi

type IUtilApi interface {
	PageIndex(ctx *gin.Context) (page int, err error)
}

所有的api服务必须要继承UtilApi,所有的公共方法

type LinkApi

type LinkApi struct {
	UtilApi
}

func (*LinkApi) Show

func (l *LinkApi) Show(ctx *gin.Context)

type PageApi

type PageApi struct {
	UtilApi
}

func (*PageApi) Index

func (p *PageApi) Index(ctx *gin.Context)

func (*PageApi) Show

func (p *PageApi) Show(ctx *gin.Context)

func (*PageApi) TotalByCategory

func (p *PageApi) TotalByCategory(ctx *gin.Context) (total int, err error)

type PostApi

type PostApi struct {
	UtilApi
}

func (*PostApi) Index

func (p *PostApi) Index(ctx *gin.Context)

func (*PostApi) Show

func (p *PostApi) Show(ctx *gin.Context)

type RssApi

type RssApi struct {
	UtilApi
}

func (*RssApi) RssGet

func (r *RssApi) RssGet(c *gin.Context)

type UtilApi

type UtilApi struct {
	*api.BaseApi
}

func (UtilApi) PageIndex

func (u UtilApi) PageIndex(ctx *gin.Context) (page int, err error)

@title: 获取当前分页数

Jump to

Keyboard shortcuts

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