matching

package
v0.0.0-...-461d2ee Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

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.

Jump to

Keyboard shortcuts

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