Documentation ¶
Index ¶
Constants ¶
View Source
const ( ID = "_id" Title = "title" Text = "text" CoverUrl = "coverUrl" Tags = "tags" UserId = "userId" Flags = "flags" UpdateAt = "updateAt" CreateAt = "createAt" )
View Source
const ( IdSorter = iota ScoreSorter )
View Source
const (
OfficialFlag = 1 << 0
)
View Source
const PostCollectionName = "post"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseFilter ¶
type BaseFilter struct { MustFlags *PostFlag MustNotFlags *PostFlag *FilterOptions }
func (*BaseFilter) CheckOnlyOfficial ¶
func (f *BaseFilter) CheckOnlyOfficial()
type FilterOptions ¶
type Post ¶
type Post struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"` Title string `bson:"title,omitempty" ` Text string `bson:"text,omitempty"` CoverUrl string `bson:"coverUrl,omitempty"` Tags []string `bson:"tags,omitempty"` UserId string `bson:"userId,omitempty"` Flags *PostFlag `bson:"flags,omitempty"` UpdateAt time.Time `bson:"updateAt,omitempty"` CreateAt time.Time `bson:"createAt,omitempty"` // 仅ES查询时使用 Score_ float64 `bson:"_score,omitempty" json:"_score,omitempty"` }
Click to show internal directories.
Click to hide internal directories.