Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommentType ¶ added in v0.30.3
type CommentType uint32
const ( CommentTypeUnknown CommentType = iota CommentTypeSubjectTopic CommentTypeGroupTopic CommentIndex CommentCharacter CommentPerson CommentEpisode )
type Repo ¶ added in v0.30.3
type Repo interface {
Get(ctx context.Context, topicType Type, id model.TopicID) (model.Topic, error)
// Count all topic for a subject/group.
Count(ctx context.Context, topicType Type, id uint32, displays []model.TopicDisplay) (int64, error)
// List return paged topic list of a subject/group.
// userID should not be filtered
List(
ctx context.Context,
topicType Type,
id uint32,
displays []model.TopicDisplay,
limit int, offset int,
) ([]model.Topic, error)
GetTopicContent(ctx context.Context, topicType Type, id model.TopicID) (model.Comment, error)
// CountReplies top comments for a topic/index/character/person/episode.
// 一级回复
// 小组和条目帖子会去除楼主发帖
CountReplies(ctx context.Context, commentType CommentType, id model.TopicID) (int64, error)
// ListReplies return paged top comment tree.
//
// []model.Comment{
// 一级回复
// {
// 一级回复对应的 **全部** 二级回复
// SubComments: []model.SubComments{}
// }
// }
ListReplies(
ctx context.Context, commentType CommentType, id model.TopicID, limit int, offset int,
) ([]model.Comment, error)
}
Click to show internal directories.
Click to hide internal directories.