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 BookingModel

type BookingModel struct {
	C *mongo.Collection
}

BookingModel represent a mgo database session with a booking data model

func (*BookingModel) All

func (m *BookingModel) All() ([]models.Booking, error)

All method will be used to get all records from bookings table

func (*BookingModel) Delete

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

Delete will be used to delete a booking registry

func (*BookingModel) FindByID

func (m *BookingModel) FindByID(id string) (*models.Booking, error)

FindByID will be used to find a booking registry by id

func (*BookingModel) Insert

func (m *BookingModel) Insert(booking models.Booking) (*mongo.InsertOneResult, error)

Insert will be used to insert a new booking registry

Jump to

Keyboard shortcuts

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