usecase

package
v0.0.0-...-9591f7d Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminOrderUseCase

type AdminOrderUseCase interface {
	UpdateOrderStatus(ctx context.Context, paymentID int, status string) error
}

type LocationUseCase

type LocationUseCase interface {
	ListProvinces(ctx context.Context, name string) ([]dto.ProvinceResponse, error)
	ListCities(ctx context.Context, params dto.ListCityParams) ([]dto.CityResponse, error)
	ListDistricts(ctx context.Context, params dto.ListDistrictParams) ([]dto.DistrictResponse, error)
	ListSubDistricts(ctx context.Context, params dto.ListSubDistrictParams) ([]dto.SubDistrictResponse, error)
}

func NewLocationUseCase

func NewLocationUseCase(store repository.Store) LocationUseCase

type LogisticUseCase

type LogisticUseCase interface {
	ListLogistics(ctx context.Context) ([]dto.Logistic, error)
}

func NewLogisticUseCase

func NewLogisticUseCase(store repository.Store) LogisticUseCase

type PartnerManagementUseCase

type PartnerManagementUseCase interface {
	AddPartner(ctx context.Context, req dto.AddPartnerRequest) error
	GetPartnerByID(ctx context.Context, id int) (*dto.PartnerResponse, error)
	EditPartner(ctx context.Context, req dto.EditPartnerRequest) error
	EditPartnerDaysAndHours(ctx context.Context, req dto.EditPartnerDaysAndHoursRequest) error
	ListPartners(ctx context.Context, params dto.ListPartnerParams) ([]dto.Partner, *dto.Pagination, error)
	RemovePartner()
}

type PharmacistManagementUseCase

type PharmacistManagementUseCase interface {
	AddPharmacist(ctx context.Context, req dto.AddPharmacistRequest) error
	ListPharmacists(ctx context.Context, params dto.ListPharmacistParams) ([]dto.Pharmacist, *dto.Pagination, error)
	GetPharmacist(ctx context.Context, userID int64) (*dto.Pharmacist, error)
	EditPharmacist(ctx context.Context, userID int64, req dto.UpdatePharmacistRequest) error
	RemovePharmacist(ctx context.Context, userID int64) error
}

type PharmacistUseCase

func NewPharmacistUseCase

func NewPharmacistUseCase(store repository.Store, producer mq.Producer) PharmacistUseCase

type PharmacyManagementUseCase

type PharmacyManagementUseCase interface {
	AddPharmacy(ctx context.Context, req dto.AddPharmacyRequest) error
	ListPharmacies(ctx context.Context, param dto.ListPharmacyParams) ([]dto.PharmacyResponse, *dto.Pagination, error)
	UpdatePharmacy()
	RemovePharmacy()
	DownloadPharmacyMedicineStock()
}

type PharmacyOrderManagementUseCase

type PharmacyOrderManagementUseCase interface {
	ListOrder(ctx context.Context, pharmacistID int64, params dto.ListPharmacyOrderQuery) ([]dto.Order, *dto.Pagination, error)
	SendOrder(ctx context.Context, pharmacistID int64, orderID int, req dto.SendOrderRequest) error
}

type PharmacyProductManagementUseCase

type PharmacyProductManagementUseCase interface {
	UpdatePharmacy(ctx context.Context) error
	ListMasterProducts(ctx context.Context, pharmacistID int64, params dto.ListProductParams) ([]dto.Product, *dto.Pagination, error)
	ListPharmacyProducts(ctx context.Context, pharmacistID int64, params dto.ListPharmacyProductParams) ([]dto.PharmacyProduct, *dto.Pagination, error)
	GetPharmacyProduct(ctx context.Context, pharmacistID int64, productID int) (*dto.PharmacyProduct, error)
	AddPharmacyProduct(ctx context.Context, pharmacistID int64, req dto.AddPharmacyProductRequest) error
	UpdatePharmacyProduct(ctx context.Context, pharmacistID int64, productID int, req dto.UpdatePharmacyProductRequest) error
	DeletePharmacyProduct(ctx context.Context, pharmacistID int64, productID int) error
}

type PharmacyUseCase

type PharmacyUseCase interface {
	ListLogistics(ctx context.Context, addressID, pharmacyID int, weight string) (*dto.ListPharmacyLogistics, error)
}

func NewPharmacyUseCase

func NewPharmacyUseCase(store repository.Store, logisticProvider logistic.Provider) PharmacyUseCase

type ProductCategoryManagementUseCase

type ProductCategoryManagementUseCase interface {
	ListProductCategories(ctx context.Context) ([]dto.ProductCategory, error)
	AddProductCategory(ctx context.Context, req dto.AddProductCategoryRequest) error
	UpdateProductCategory(ctx context.Context, id int, req dto.UpdateProductCategoryRequest) error
	RemoveProductCategory(ctx context.Context, id int) error
}

type ProductManagementUseCase

type ProductManagementUseCase interface {
	AddProduct(ctx context.Context, req dto.AddProductRequest) error
	ListProduct(ctx context.Context, params dto.ListProductParams) ([]dto.Product, *dto.Pagination, error)
	UpdateProduct(ctx context.Context) error
	RemoveProduct(ctx context.Context) error
	SearchProducts(ctx context.Context) error
	ListManufacturer(ctx context.Context, params dto.ListProductDetailParams) ([]dto.ProductDetail, error)
	ListProductClassification(ctx context.Context, params dto.ListProductDetailParams) ([]dto.ProductDetail, error)
	ListProductForm(ctx context.Context, params dto.ListProductDetailParams) ([]dto.ProductDetail, error)
}

type UserCartUseCase

type UserCartUseCase interface {
	GetItems(ctx context.Context, userID int64) ([]dto.CartContent, error)
	AddItem(ctx context.Context, userID int64, req dto.AddCartItemRequest) error
	UpdateItem(ctx context.Context, userId int64, pharmacyID, productID int, req dto.UpdateCartItemRequest) error
	RemoveItem(ctx context.Context, userId int64, pharmacyID, productID int) error
}

type UserHomepageUseCase

type UserHomepageUseCase interface {
	ListBestsellerProduct(ctx context.Context, limit int) ([]dto.Item, error)
	ListRecommendedProduct(ctx context.Context, req dto.ListPopularProductQueries) ([]dto.Item, error)
	ListProduct(ctx context.Context, queries dto.ListProductQueries) ([]dto.Item, *dto.Pagination, error)
}

type UserLoginUseCase

type UserLoginUseCase interface {
	Login(ctx context.Context, req dto.LoginRequest) (*dto.LoginResponse, error)
	GoogleLogin(ctx context.Context, req dto.GoogleLoginRequest) (*dto.LoginResponse, error)
	GoogleLoginCallback(ctx context.Context, req dto.GoogleLoginCallback) (*dto.LoginResponse, error)
}

type UserManagementUseCase

type UserManagementUseCase interface {
	ListUsers(ctx context.Context, params dto.ListUserParams) ([]dto.UserResponse, *dto.Pagination, error)
}

type UserOrderUseCase

type UserOrderUseCase interface {
	CreateOrder(ctx context.Context, userID int64, req dto.CreateOrderRequest) error
	ListUnpaidOrder(ctx context.Context, userID int64) ([]dto.UnpaidOrder, error)
	ListOrder(ctx context.Context, userID int64, status string) ([]dto.Order, error)
	UploadPaymentProof(ctx context.Context, paymentID int, imageURL string) error
	UpdateOrderStatus(ctx context.Context, orderID int, userID int64, status string) error
}

type UserPasswordResetUseCase

type UserPasswordResetUseCase interface {
	ResetPassword(ctx context.Context, req dto.ResetPasswordRequest) error
	ConfirmResetPassword(ctx context.Context, req dto.ConfirmResetRequest) error
}

type UserProductDetailUseCase

type UserProductDetailUseCase interface {
	GetProductDetails(ctx context.Context, uri dto.GetProductDetailURI, queries dto.GetProductDetailParams) (*dto.GetProductDetail, error)
	AvailablePharmacy(ctx context.Context, productID int) ([]dto.AvailablePharmacy, error)
}

type UserProfileUseCase

type UserProfileUseCase interface {
	UpdateProfile()
	AddAddress(ctx context.Context, req dto.CustomerAddressRequest, userId int64) error
	GetAddresses(ctx context.Context, userId int64) ([]dto.CustomerAddressResponse, error)
}

type UserRegistrationUseCase

type UserRegistrationUseCase interface {
	Register(ctx context.Context, req dto.RegisterRequest) error
	Verify(ctx context.Context, req dto.VerifyRequest) error
	GoogleRegister(ctx context.Context, req dto.GoogleRegisterRequest) error
	GoogleRegisterCallback(ctx context.Context, req dto.GoogleRegisterCallback) error
}

Jump to

Keyboard shortcuts

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