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 ShowTimeModel

type ShowTimeModel struct {
	C *mongo.Collection
}

ShowTimeModel represent a mgo database session with a showtime data model.

func (*ShowTimeModel) All

func (m *ShowTimeModel) All() ([]models.ShowTime, error)

All method will be used to get all records from showtimes table.

func (*ShowTimeModel) Delete

func (m *ShowTimeModel) Delete(id string) (*mongo.DeleteResult, error)

Delete will be used to delete a showtime registry

func (*ShowTimeModel) FindByDate

func (m *ShowTimeModel) FindByDate(date string) (*models.ShowTime, error)

FindByDate will be used to find a showtime registry by date

func (*ShowTimeModel) FindByID

func (m *ShowTimeModel) FindByID(id string) (*models.ShowTime, error)

FindByID will be used to find a showtime registry by id

func (*ShowTimeModel) Insert

func (m *ShowTimeModel) Insert(showtime models.ShowTime) (*mongo.InsertOneResult, error)

Insert will be used to insert a new showtime registry

Jump to

Keyboard shortcuts

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