Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IDsFromHex ¶
IDsFromHex convert array of hex to mongoDB objectID
Types ¶
type Post ¶
type Post struct { ID primitive.ObjectID `bson:"_id"` Name string Avatar string Body string UpvoterIDs map[string]bool `bson:"upvoterIDs"` DownvoterIDs map[string]bool `bson:"downvoterIDs"` ReplyCount int `bson:"replyCount"` Repost []Post `bson:"repost"` Room []Room `bson:"room"` RepostRoom []Room `bson:"repostRoom"` }
Post extract model
type PostModel ¶
type PostModel struct { ID primitive.ObjectID `bson:"_id"` Name string Avatar string Body string UpvoterIDs map[string]bool `bson:"upvoterIDs"` DownvoterIDs map[string]bool `bson:"downvoterIDs"` ReplyCount int `bson:"replyCount"` ParentID primitive.ObjectID `bson:"parentID"` RepostID primitive.ObjectID `bson:"repostID"` RoomID primitive.ObjectID `bson:"roomID"` }
PostModel db model
Click to show internal directories.
Click to hide internal directories.