mongodb

package
v0.0.0-...-7876fda Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProductModel

type ProductModel struct {
	C *mongo.Collection
}

func (*ProductModel) All

func (m *ProductModel) All() ([]models.Product, error)

func (*ProductModel) Delete

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

func (*ProductModel) FindByID

func (m *ProductModel) FindByID(id string) (*models.Product, error)

func (*ProductModel) Insert

func (m *ProductModel) Insert(Product models.Product) (*mongo.InsertOneResult, error)

Jump to

Keyboard shortcuts

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