Documentation ¶
Index ¶
- type MongoDB
- func (db *MongoDB) Create(tutorial model.Tutorial) error
- func (db *MongoDB) Delete(id string) error
- func (db *MongoDB) DeleteAll() error
- func (db *MongoDB) FindAll(title string) ([]*model.Tutorial, error)
- func (db *MongoDB) FindAllPublished() ([]*model.Tutorial, error)
- func (db *MongoDB) FindOne(id string) (model.Tutorial, error)
- func (db *MongoDB) Update(tutorial model.Tutorial) error
- type TutorialRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoDB ¶
func (*MongoDB) FindAllPublished ¶
FindAllPublished func is find all published into mongodb is true
type TutorialRepository ¶
type TutorialRepository interface { Create(tutorial model.Tutorial) error FindAll(title string) ([]*model.Tutorial, error) FindOne(id string) (model.Tutorial, error) Update(tutorial model.Tutorial) error Delete(id string) error DeleteAll() error FindAllPublished() ([]*model.Tutorial, error) }
TutorialRepository is contain interface
Click to show internal directories.
Click to hide internal directories.