Documentation ¶
Index ¶
- type PostModel
- func (m *PostModel) Create(post *models.Post) (*mongo.InsertOneResult, error)
- func (m *PostModel) GetAll() ([]models.Post, error)
- func (m *PostModel) GetAllByUser(userID string) ([]models.Post, error)
- func (m *PostModel) GetById(id string) (*models.Post, error)
- func (m *PostModel) GetByTitle(title string) (*models.Post, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostModel ¶
type PostModel struct {
C *mongo.Collection
}
func (*PostModel) GetAllByUser ¶
Get all posts by a user
Click to show internal directories.
Click to hide internal directories.