Documentation ¶
Index ¶
Constants ¶
View Source
const (
CategoryHomeRecommend = "home_recommend"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Author ¶
type FeedDetailRequest ¶
type FeedDetailRequest struct { NoteId uint64 `form:"note_id"` Source string `form:"source,optional"` }
func (*FeedDetailRequest) Validate ¶
func (r *FeedDetailRequest) Validate() error
type FeedNoteItem ¶
type FeedNoteItem struct { NoteId uint64 `json:"note_id"` Title string `json:"title"` Desc string `json:"desc"` CreateAt int64 `json:"create_at"` Images NoteItemImageList `json:"images"` Likes uint64 `json:"likes"` // 笔记总点赞数 // 下面这些字段要额外设置 Author *Author `json:"author"` // 作者信息 Comments uint64 `json:"comments"` // 笔记总评论数 Interact Interaction `json:"interact"` // 当前请求的用户与该笔记的交互记录,比如点赞、评论、收藏等动作 }
func NewFeedNoteItemFromPb ¶
func NewFeedNoteItemFromPb(pb *notev1.FeedNoteItem) *FeedNoteItem
type FeedRecommendRequest ¶
type FeedRecommendRequest struct { NeedNum int `form:"need_num"` Platform string `form:"platform,optional"` Category string `form:"category,optional"` }
func (*FeedRecommendRequest) Validate ¶
func (r *FeedRecommendRequest) Validate() error
type Interaction ¶
type Interaction struct { Liked bool `json:"liked"` // 用户是否点赞过该笔记 Commented bool `json:"commented"` // 用户是否评论过该笔记 }
包含发起请求的用户和该笔记的交互记录
type NoteItemImage ¶
type NoteItemImageList ¶
type NoteItemImageList []*NoteItemImage
Click to show internal directories.
Click to hide internal directories.