Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MatchedAttributeDTO ¶
type MatchedAttributeDTO struct { Attribute attributes.Attribute `json:"attribute"` Found bool `json:"found"` }
MatchedAttributeDTO stores information about selected attributes from the specific product.
type MatchedProductDTO ¶
type MatchedProductDTO struct { Score int `json:"score"` Product ec.ProductDTO `json:"product"` Attributes []MatchedAttributeDTO `json:"attributes"` StandID string }
MatchedProductDTO stores information about product.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service performs products matching.
func NewService ¶
func NewService(standService standService, attributesRepository attributesRepository) *Service
NewService returns new Service.
func (*Service) MatchProducts ¶
func (s *Service) MatchProducts(selectedTags []attributes.Attribute) ([]MatchedProductDTO, error)
MatchProducts select products depending on attributes. SelectedTags must be unique.
Click to show internal directories.
Click to hide internal directories.