Documentation ¶
Index ¶
- type BasketRepo
- func (r *BasketRepo) AddToBasket(productId, uId *primitive.ObjectID) (primitive.ObjectID, error)
- func (r *BasketRepo) AddToItemCount(value int8, BasketID *primitive.ObjectID) error
- func (r *BasketRepo) ClearUserBasket(userId *primitive.ObjectID) error
- func (r *BasketRepo) DeleteItem(basketId *primitive.ObjectID) error
- func (r *BasketRepo) FetchUserBasket(uId *primitive.ObjectID) (*[]model.BasketResponseModel, error)
- type CategoriesRepo
- type ProductRepo
- type UsersRepo
- func (r *UsersRepo) FindUserByEmail(email string) (*model.User, error)
- func (r *UsersRepo) FindUserById(Id primitive.ObjectID) (*model.User, error)
- func (r *UsersRepo) InsertOAuthUser(user *model.OAuthUser) (*mongo.InsertOneResult, error)
- func (r *UsersRepo) InsertUser(user *model.User) (*mongo.InsertOneResult, error)
- func (r *UsersRepo) UpdateUserById(user *model.User) (int64, error)
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 (*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 (*UsersRepo) FindUserById ¶
func (*UsersRepo) InsertOAuthUser ¶
func (*UsersRepo) InsertUser ¶
Click to show internal directories.
Click to hide internal directories.