mongodb

package
v0.0.0-...-44dc85e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL