postgres

package
v0.0.0-...-990eb5e Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CategoryService

type CategoryService struct {
	// contains filtered or unexported fields
}

func NewCategoryService

func NewCategoryService(cs category.Store) *CategoryService

func (CategoryService) GetAncestorCategories

func (s CategoryService) GetAncestorCategories(ctx context.Context, categoryID int32) ([]anor.Category, error)

func (CategoryService) GetCategory

func (s CategoryService) GetCategory(ctx context.Context, categoryID int32) (anor.Category, error)

func (CategoryService) GetChildCategories

func (s CategoryService) GetChildCategories(ctx context.Context, categoryID int32) ([]anor.Category, error)

func (CategoryService) GetSiblingCategories

func (s CategoryService) GetSiblingCategories(ctx context.Context, categoryID int32) ([]anor.Category, error)

type ProductService

type ProductService struct {
	// contains filtered or unexported fields
}

func NewProductService

func NewProductService(ps product.Store, cs category.Store) *ProductService

func (ProductService) GetProduct

func (s ProductService) GetProduct(ctx context.Context, id int64) (*anor.Product, error)

func (ProductService) GetProductsByLeafCategoryID

func (s ProductService) GetProductsByLeafCategoryID(
	ctx context.Context,
	categoryID int32,
	params anor.GetProductsByCategoryParams,
) ([]anor.Product, int64, error)

func (ProductService) GetProductsByNonLeafCategoryID

func (s ProductService) GetProductsByNonLeafCategoryID(
	ctx context.Context,
	categoryID int32,
	params anor.GetProductsByCategoryParams,
) ([]anor.Product, int64, error)

type UserService

type UserService struct {
	// contains filtered or unexported fields
}

func NewUserService

func NewUserService(us user.Store) *UserService

func (UserService) CreateUser

func (s UserService) CreateUser(ctx context.Context, u anor.User) error

func (UserService) GetUser

func (s UserService) GetUser(ctx context.Context, id int64) (anor.User, error)

func (UserService) GetUserByEmail

func (s UserService) GetUserByEmail(ctx context.Context, email string) (anor.User, error)

func (UserService) UpdateUserOTP

func (s UserService) UpdateUserOTP(ctx context.Context, id int64, otp string, otpExpiry int64) error

func (UserService) UpdateUserPassword

func (s UserService) UpdateUserPassword(ctx context.Context, id int64, password string) error

func (UserService) UpdateUserStatus

func (s UserService) UpdateUserStatus(ctx context.Context, status anor.UserStatus, id int64) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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