repository

package
v0.0.0-...-7c86508 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasketRepo

type BasketRepo struct {
	MongoCollection *mongo.Collection
}

func (*BasketRepo) AddToBasket

func (r *BasketRepo) AddToBasket(productId, uId *primitive.ObjectID) (primitive.ObjectID, error)

func (*BasketRepo) AddToItemCount

func (r *BasketRepo) AddToItemCount(value int8, BasketID *primitive.ObjectID) error

func (*BasketRepo) ClearUserBasket

func (r *BasketRepo) ClearUserBasket(userId *primitive.ObjectID) error

func (*BasketRepo) DeleteItem

func (r *BasketRepo) DeleteItem(basketId *primitive.ObjectID) error

func (*BasketRepo) FetchUserBasket

func (r *BasketRepo) FetchUserBasket(uId *primitive.ObjectID) (*[]model.BasketResponseModel, error)

type CategoriesRepo

type CategoriesRepo struct {
	MongoCollection *mongo.Collection
}

func (*CategoriesRepo) GetCategories

func (r *CategoriesRepo) GetCategories() (*[]model.Category, error)

type ProductRepo

type ProductRepo struct {
	MongoCollection *mongo.Collection
}

func (*ProductRepo) FetchFeatured

func (r *ProductRepo) FetchFeatured(searchText string, offset int64, requestData *model.ProductRequest) ([]model.Product, error)

type UsersRepo

type UsersRepo struct {
	MongoCollection *mongo.Collection
}

func (*UsersRepo) FindUserByEmail

func (r *UsersRepo) FindUserByEmail(email string) (*model.User, error)

func (*UsersRepo) FindUserById

func (r *UsersRepo) FindUserById(Id primitive.ObjectID) (*model.User, error)

func (*UsersRepo) InsertOAuthUser

func (r *UsersRepo) InsertOAuthUser(user *model.OAuthUser) (*mongo.InsertOneResult, error)

func (*UsersRepo) InsertUser

func (r *UsersRepo) InsertUser(user *model.User) (*mongo.InsertOneResult, error)

func (*UsersRepo) UpdateUserById

func (r *UsersRepo) UpdateUserById(user *model.User) (int64, error)

Jump to

Keyboard shortcuts

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