Documentation ¶
Index ¶
- Constants
- type AdminInput
- type ArticleGrpInput
- type ArticleGrpListSafe
- type ArticleInput
- type ArticleList
- type ArticleListSafe
- type ArticleQuery
- type ArticleQuerySafe
- type ArticleSafe
- type FileInfo
- type Id
- type IdInput
- type LinkInput
- type Login
- type Out
- type Paging
- type ReplyBody
- type ReplyFloorApp
- type ReplyInput
- type ReplyInputApp
- type ReplyQuery
- type ReplyShow
- type ReplyStatus
- type SentenceInput
- type SentenceQuery
Constants ¶
View Source
const ( AllStatus = iota CheckStatus SuccessStatus FailStatus )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminInput ¶
type ArticleGrpInput ¶
type ArticleGrpListSafe ¶
type ArticleGrpListSafe struct { entity.ArticleGrp ArticleCount uint `json:"article_count"` Onshow Out `json:"onshow,omitempty"` Order Out `json:"order,omitempty"` }
type ArticleInput ¶
type ArticleInput struct { GrpId Id `json:"grpId" v:"required|integer|between:1,4294967295"` Title string `json:"title" v:"required|length:2, 100"` Author string `json:"author" v:"length:2, 30"` Thumb string `json:"thumb" v:"length:2, 200"` Tags string `json:"tags" v:"length:2, 200"` Description string `json:"description" v:"length:2, 200"` Content string `json:"content" v:"length:2, 100000"` Order int `json:"order" v:"integer|between:-9999,9999"` Ontop uint `json:"ontop" v:"boolean"` Onshow uint `json:"onshow" v:"boolean"` Hist uint `json:"hist" v:"integer|between:0,999999"` Post uint `json:"post" v:"integer|between:0,999999"` }
type ArticleList ¶
type ArticleListSafe ¶
type ArticleListSafe struct { entity.Article ArticleSafe Content Out `json:"content,omitempty"` }
type ArticleQuery ¶
type ArticleQuery struct { ArticleQuerySafe Onshow bool `json:"onshow" dc:"是否查询只发布的文章"` IsDel bool `json:"isDel" dc:"是否查询删除掉的文章"` }
type ArticleQuerySafe ¶
type ArticleSafe ¶
type IdInput ¶
type IdInput struct {
Id Id `json:"id" v:"required|integer|between:1,4294967295"`
}
IdInput 公共Id input,一般用作api中的upd和del
type Paging ¶
type Paging struct { Page int `v:"integer|between:1,9999999" json:"page" dc:"查询分页:页码,默认1"` Size int `v:"integer|between:1,100" json:"size" dc:"查询分页:条数,默认15"` }
Paging 分页查询条件
type ReplyBody ¶
type ReplyBody struct { Name string `json:"name" v:"required|length:1,20"` Email string `json:"email" v:"required|email|length:1,100"` Site string `json:"site" v:"url|length:1,50"` Content string `json:"content" v:"required|length:2, 100000"` }
ReplyBody 回复内容主体
type ReplyFloorApp ¶
type ReplyFloorApp struct { Id Id `json:"id" description:""` Pid Id `json:"pid" description:"回复父id"` PName string `json:"pName" description:"回复父名称"` Email string `json:"email" description:"回复人邮箱"` Name string `json:"name" description:"回复人名称"` Site string `json:"site" description:"回复人网站"` Content string `json:"content" description:"回复内容"` CreatedAt *gtime.Time `json:"createdAt" description:"创建时间"` UpdatedAt *gtime.Time `json:"updatedAt" description:"更新时间"` List []ReplyFloorApp `json:"list" description:"子回复列表"` }
ReplyFloorApp 回复楼,是一个二维结构
type ReplyInput ¶
type ReplyInput struct { ReplyInputApp Status ReplyStatus `json:"status" v:"in:1,2,3" dc:"审核状态,1待审核 2审核通过 3审核失败,默认2"` }
ReplyInput 新增回复,多了Status
type ReplyInputApp ¶
type ReplyInputApp struct { ReplyBody Aid Id `json:"aid" v:"required|integer|between:1,4294967295"` Pid Id `json:"pid" v:"required|integer|between:0,4294967295" dc:"如果传入pid,aid会自动跟随父回复"` }
ReplyInputApp App新增回复
type ReplyQuery ¶
type ReplyQuery struct { Paging Aid Id `json:"aid" v:"integer|between:1,4294967295"` Status ReplyStatus `json:"status" v:"in:1,2,3" dc:"查询状态,1待审核 2审核通过 3审核失败 ,不传则查询所有"` Search string `v:"length: 1,30" json:"search" dc:"查询文本,会检索名称,邮箱,内容"` }
type SentenceQuery ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.