Documentation ¶
Index ¶
- Constants
- type ProductAuthedCreator
- type ProductAuthedCreatorOptions
- type ProductAuthedDeleter
- type ProductAuthedDeleterOptions
- type ProductAuthedLister
- type ProductAuthedListerOptions
- type ProductAuthedUpdater
- type ProductAuthedUpdaterOptions
- type ProductCreator
- type ProductCreatorOptions
- type ProductDeleter
- type ProductDeleterOptions
- type ProductFormValidator
- type ProductFormValidatorOptions
- type ProductGetter
- type ProductGetterOptions
- type ProductLister
- type ProductListerOptions
- type ProductSellerChecker
- type ProductSellerCheckerOptions
- type ProductUpdater
- type ProductUpdaterOptions
Constants ¶
View Source
const ( LimitDefault = 10 OffsetDefault = 0 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProductAuthedCreator ¶
type ProductAuthedCreator struct {
// contains filtered or unexported fields
}
func NewProductAuthedCreator ¶
func NewProductAuthedCreator(options ProductAuthedCreatorOptions) *ProductAuthedCreator
func (ProductAuthedCreator) AuthedCreate ¶
func (s ProductAuthedCreator) AuthedCreate(ctx context.Context, userId string, form usecase.AuthedProductForm) (usecase.Product, error)
type ProductAuthedCreatorOptions ¶
type ProductAuthedCreatorOptions struct { SellerGetter sellerusecase.SellerGetter ProductCreator usecase.ProductCreator }
type ProductAuthedDeleter ¶
type ProductAuthedDeleter struct {
// contains filtered or unexported fields
}
func NewProductAuthedDeleter ¶
func NewProductAuthedDeleter(options ProductAuthedDeleterOptions) *ProductAuthedDeleter
func (ProductAuthedDeleter) AuthedDelete ¶
func (s ProductAuthedDeleter) AuthedDelete(ctx context.Context, userId, id string) error
type ProductAuthedDeleterOptions ¶
type ProductAuthedDeleterOptions struct { SellerGetter sellerusecase.SellerGetter ProductDeleter usecase.ProductDeleter }
type ProductAuthedLister ¶
type ProductAuthedLister struct {
// contains filtered or unexported fields
}
func NewProductAuthedLister ¶
func NewProductAuthedLister(options ProductAuthedListerOptions) *ProductAuthedLister
func (ProductAuthedLister) AuthedList ¶
func (s ProductAuthedLister) AuthedList(ctx context.Context, userId string, limit, offset int) (usecase.ProductList, error)
type ProductAuthedListerOptions ¶
type ProductAuthedListerOptions struct { SellerGetter sellerusecase.SellerGetter ProductRepository repository.ProductRepository }
type ProductAuthedUpdater ¶
type ProductAuthedUpdater struct {
// contains filtered or unexported fields
}
func NewProductAuthedUpdater ¶
func NewProductAuthedUpdater(options ProductAuthedUpdaterOptions) *ProductAuthedUpdater
func (ProductAuthedUpdater) AuthedUpdate ¶
func (s ProductAuthedUpdater) AuthedUpdate(ctx context.Context, userId, id string, form usecase.AuthedProductForm) (usecase.Product, error)
type ProductAuthedUpdaterOptions ¶
type ProductAuthedUpdaterOptions struct { SellerGetter sellerusecase.SellerGetter ProductUpdater usecase.ProductUpdater }
type ProductCreator ¶
type ProductCreator struct {
// contains filtered or unexported fields
}
func NewProductCreator ¶
func NewProductCreator(options ProductCreatorOptions) *ProductCreator
func (ProductCreator) Create ¶
func (s ProductCreator) Create(ctx context.Context, form usecase.ProductForm) (usecase.Product, error)
type ProductCreatorOptions ¶
type ProductCreatorOptions struct { ProductFormValidator usecase.ProductFormValidator ProductRepository repository.ProductRepository Nower timehelper.Nower IDGen idgen.IDGen }
type ProductDeleter ¶
type ProductDeleter struct {
// contains filtered or unexported fields
}
func NewProductDeleter ¶
func NewProductDeleter(options ProductDeleterOptions) *ProductDeleter
type ProductDeleterOptions ¶
type ProductDeleterOptions struct {
ProductRepository repository.ProductRepository
}
type ProductFormValidator ¶
type ProductFormValidator struct {
// contains filtered or unexported fields
}
func NewProductFormValidator ¶
func NewProductFormValidator(options ProductFormValidatorOptions) *ProductFormValidator
func (ProductFormValidator) Validate ¶
func (v ProductFormValidator) Validate(ctx context.Context, form usecase.ProductForm) error
type ProductFormValidatorOptions ¶
type ProductFormValidatorOptions struct {
SellerExistsRuleFactory factory.SellerExistsRuleFactory
}
type ProductGetter ¶
type ProductGetter struct {
// contains filtered or unexported fields
}
func NewProductGetter ¶
func NewProductGetter(options ProductGetterOptions) *ProductGetter
type ProductGetterOptions ¶
type ProductGetterOptions struct {
ProductRepository repository.ProductRepository
}
type ProductLister ¶
type ProductLister struct {
// contains filtered or unexported fields
}
func NewProductLister ¶
func NewProductLister(options ProductListerOptions) *ProductLister
func (ProductLister) List ¶
func (s ProductLister) List(ctx context.Context, limit, offset int) (usecase.ProductList, error)
type ProductListerOptions ¶
type ProductListerOptions struct {
ProductRepository repository.ProductRepository
}
type ProductSellerChecker ¶
type ProductSellerChecker struct {
// contains filtered or unexported fields
}
func NewProductSellerChecker ¶
func NewProductSellerChecker(options ProductSellerCheckerOptions) *ProductSellerChecker
func (ProductSellerChecker) CheckSeller ¶
func (s ProductSellerChecker) CheckSeller(ctx context.Context, userId, id string) error
type ProductSellerCheckerOptions ¶
type ProductSellerCheckerOptions struct { SellerGetter sellerusecase.SellerGetter ProductRepository repository.ProductRepository }
type ProductUpdater ¶
type ProductUpdater struct {
// contains filtered or unexported fields
}
func NewProductUpdater ¶
func NewProductUpdater(options ProductUpdaterOptions) *ProductUpdater
type ProductUpdaterOptions ¶
type ProductUpdaterOptions struct { ProductFormValidator usecase.ProductFormValidator ProductRepository repository.ProductRepository Nower timehelper.Nower }
Click to show internal directories.
Click to hide internal directories.