Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MovieModel ¶
type MovieModel struct {
C *mongo.Collection
}
MovieModel represent a mgo database session with a movie data model.
func (*MovieModel) All ¶
func (m *MovieModel) All() ([]models.Movie, error)
All method will be used to get all records from the movies table.
func (*MovieModel) Delete ¶
func (m *MovieModel) Delete(id string) (*mongo.DeleteResult, error)
Delete will be used to delete a movie registry
func (*MovieModel) FindByID ¶
func (m *MovieModel) FindByID(id string) (*models.Movie, error)
FindByID will be used to find a new movie registry by id
func (*MovieModel) Insert ¶
func (m *MovieModel) Insert(movie models.Movie) (*mongo.InsertOneResult, error)
Insert will be used to insert a new movie registry
Click to show internal directories.
Click to hide internal directories.