application

package
v3.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: OSL-3.0 Imports: 9 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProductSearchService

type ProductSearchService struct {
	SearchService         domain.SearchService         `inject:""`
	PaginationInfoFactory *utils.PaginationInfoFactory `inject:""`
	DefaultPageSize       float64                      `inject:"config:commerce.product.pagination.defaultPageSize,optional"`
	Logger                flamingo.Logger              `inject:""`
}

ProductSearchService - Application service that offers a more explicit way to search for product results - on top of the domain.ProductSearchService

func (*ProductSearchService) Find

Find return SearchResult with matched products - based on given input

func (*ProductSearchService) FindBy

func (s *ProductSearchService) FindBy(ctx context.Context, attributeCode string, values []string, searchRequest *application.SearchRequest) (*SearchResult, error)

FindBy return SearchResult with matched products filtered by the given attribute - based on given input

type SearchResult

type SearchResult struct {
	Suggestions    []searchdomain.Suggestion
	Products       []domain.BasicProduct
	SearchMeta     searchdomain.SearchMeta
	Facets         searchdomain.FacetCollection
	PaginationInfo utils.PaginationInfo
}

SearchResult - much like the corresponding struct in search package, just that instead "Hits" we have a list of matching Products

type URLService

type URLService struct {
	// contains filtered or unexported fields
}

URLService to manage product urls

func (*URLService) Get

func (s *URLService) Get(product domain.BasicProduct, variantCode string) (string, error)

Get a product variant url

func (*URLService) GetAbsolute

func (s *URLService) GetAbsolute(r *web.Request, product domain.BasicProduct, variantCode string) (string, error)

GetAbsolute url for a product variant url

func (*URLService) GetNameParam

func (s *URLService) GetNameParam(product domain.BasicProduct, variantCode string) string

GetNameParam retrieve the proper name parameter

func (*URLService) GetURLParams

func (s *URLService) GetURLParams(product domain.BasicProduct, variantCode string) map[string]string

GetURLParams get product url params

func (*URLService) Inject

func (s *URLService) Inject(
	r *web.Router,
	c *struct {
		GenerateSlug      bool   `inject:"config:commerce.product.generateSlug,optional"`
		SlugAttributecode string `inject:"config:commerce.product.slugAttributeCode,optional"`
	},
) *URLService

Inject dependencies

Jump to

Keyboard shortcuts

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