Documentation ¶
Index ¶
- func CountReaction(postID primitive.ObjectID) (int64, error)
- func Delete(id primitive.ObjectID) error
- func DeleteReaction(filter bson.M) error
- func DeleteReactionByPost(postID primitive.ObjectID) error
- func GetReaction(postID primitive.ObjectID, userID primitive.ObjectID) (int, error)
- type Post
- func FindNewer(newerThan primitive.ObjectID) ([]Post, error)
- func FindNewerOrOlder(anchor primitive.ObjectID, newer bool) ([]Post, error)
- func FindOlder(olderThan primitive.ObjectID) ([]Post, error)
- func FindOne(filter bson.M) (*Post, error)
- func RetrievePosts(filter bson.M, iteration int64) ([]Post, error)
- type Reaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteReaction ¶
func DeleteReactionByPost ¶
Types ¶
type Post ¶
type Post struct { ID primitive.ObjectID `json:"id" bson:"_id,omitempty"` AuthorID primitive.ObjectID `json:"author" bson:"author,required"` Content string `json:"content" bson:"content,required"` ImageIDs []primitive.ObjectID `json:"image" bson:"image,required"` CreatedAt time.Time `json:"createdAt" bson:"createdAt,required"` }
func FindNewerOrOlder ¶
Click to show internal directories.
Click to hide internal directories.