Documentation ¶
Index ¶
- Constants
- func FindByID(ctx context.Context, coll *mongo.Collection, id int, m interface{}) error
- func FindCommentsByPostID(ctx context.Context, db *mongo.Database, postID int) ([]*models.Comment, error)
- func FindPostByID(ctx context.Context, db *mongo.Database, id int) (*models.Post, error)
- func SaveComment(ctx context.Context, db *mongo.Database, c *models.Comment) error
- func SavePost(ctx context.Context, db *mongo.Database, p *models.Post) error
Constants ¶
View Source
const ( PostCollection = "posts" CommentCollection = "comments" )
Variables ¶
This section is empty.
Functions ¶
func FindCommentsByPostID ¶
func FindPostByID ¶
func SaveComment ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.