Documentation
¶
Index ¶
- type DefaultPostDAO
- func (uM *DefaultPostDAO) Create(nPost *webmsgspec.NewPostDTO) (u *models.PostModel, err error)
- func (uM *DefaultPostDAO) Delete(id bson.ObjectId) error
- func (u *DefaultPostDAO) Ensures()
- func (uM *DefaultPostDAO) Find(id bson.ObjectId) (u *models.PostModel, err error)
- func (uM *DefaultPostDAO) FindByEmail(email string) (u *models.PostModel, err error)
- func (uM *DefaultPostDAO) FindMany(query map[string]interface{}, sortBy []string, offset int, limit int) ([]*models.PostModel, error)
- func (uM *DefaultPostDAO) Replace(updPost *webmsgspec.UpdatePostDTO) (u *models.PostModel, err error)
- type PostDAO
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultPostDAO ¶
func NewDefaulPostDAO ¶
func NewDefaulPostDAO(session *mgo.Session) *DefaultPostDAO
func (*DefaultPostDAO) Create ¶
func (uM *DefaultPostDAO) Create(nPost *webmsgspec.NewPostDTO) (u *models.PostModel, err error)
func (*DefaultPostDAO) Ensures ¶
func (u *DefaultPostDAO) Ensures()
func (*DefaultPostDAO) FindByEmail ¶
func (uM *DefaultPostDAO) FindByEmail(email string) (u *models.PostModel, err error)
func (*DefaultPostDAO) Replace ¶
func (uM *DefaultPostDAO) Replace(updPost *webmsgspec.UpdatePostDTO) (u *models.PostModel, err error)
type PostDAO ¶
type PostDAO interface {
Find(bson.ObjectId) (*models.PostModel, error)
FindMany(query map[string]interface{}, sortBy []string, offset int, limit int) ([]*models.PostModel, error)
Create(*webmsgspec.NewPostDTO) (*models.PostModel, error)
Replace(*webmsgspec.UpdatePostDTO) (*models.PostModel, error)
Delete(bson.ObjectId) error
}
Click to show internal directories.
Click to hide internal directories.