Documentation ¶
Index ¶
- type ProductService
- type SearchService
- func (s *SearchService) Inject(productService *ProductService) *SearchService
- func (s *SearchService) Search(ctx context.Context, filter ...searchDomain.Filter) (*domain.SearchResult, error)
- func (s *SearchService) SearchBy(ctx context.Context, attribute string, values []string, ...) (*domain.SearchResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProductService ¶
type ProductService struct {
// contains filtered or unexported fields
}
ProductService is just mocking stuff
func (*ProductService) FakeSimple ¶
func (ps *ProductService) FakeSimple(marketplaceCode string, isNew bool, isExclusive bool, isOutOfStock bool, isDiscounted bool, hasFixedPrice bool) domain.SimpleProduct
FakeSimple generates a simple fake product
func (*ProductService) Get ¶
func (ps *ProductService) Get(_ context.Context, marketplaceCode string) (domain.BasicProduct, error)
Get returns a product struct
func (*ProductService) Inject ¶
func (ps *ProductService) Inject( c *struct { CurrencyCode string `inject:"config:commerce.product.fakeservice.currency,optional"` }, ) *ProductService
Inject dependencies
type SearchService ¶
type SearchService struct {
// contains filtered or unexported fields
}
SearchService is just mocking stuff
func (*SearchService) Inject ¶
func (s *SearchService) Inject( productService *ProductService, ) *SearchService
Inject dependencies
func (*SearchService) Search ¶
func (s *SearchService) Search(ctx context.Context, filter ...searchDomain.Filter) (*domain.SearchResult, error)
Search returns Products based on given Filters
func (*SearchService) SearchBy ¶
func (s *SearchService) SearchBy(ctx context.Context, attribute string, values []string, filter ...searchDomain.Filter) (*domain.SearchResult, error)
SearchBy returns Products prefiltered by the given attribute (also based on additional given Filters)
Click to show internal directories.
Click to hide internal directories.