index

package
v1.83.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TopBrandsCount      = 150
	TopPersonsCount     = 5
	TopFactoriesCount   = 8
	TopCategoriesCount  = 15
	TopTwinsBrandsCount = 20
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BrandsCache

type BrandsCache struct {
	Items []items.Item
	Total int
}

type Index

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

func NewIndex

func NewIndex(redis *redis.Client, repository *items.Repository) *Index

func (*Index) BrandsCache

func (s *Index) BrandsCache(ctx context.Context, lang string) (BrandsCache, error)

func (*Index) CategoriesCache

func (s *Index) CategoriesCache(ctx context.Context, lang string) ([]items.Item, error)

func (*Index) FactoriesCache

func (s *Index) FactoriesCache(ctx context.Context, lang string) ([]items.Item, error)

func (*Index) GenerateBrandsCache

func (s *Index) GenerateBrandsCache(ctx context.Context, lang string) error

func (*Index) GenerateCategoriesCache

func (s *Index) GenerateCategoriesCache(ctx context.Context, lang string) error

func (*Index) GenerateFactoriesCache

func (s *Index) GenerateFactoriesCache(ctx context.Context, lang string) error

func (*Index) GeneratePersonsCache

func (s *Index) GeneratePersonsCache(
	ctx context.Context, pictureItemType pictures.ItemPictureType, lang string,
) error

func (*Index) GenerateTwinsCache

func (s *Index) GenerateTwinsCache(ctx context.Context, lang string) error

func (*Index) PersonsCache

func (s *Index) PersonsCache(
	ctx context.Context, pictureItemType pictures.ItemPictureType, lang string,
) ([]items.Item, error)

func (*Index) TwinsCache

func (s *Index) TwinsCache(ctx context.Context, lang string) (TwinsCache, error)

type TwinsCache

type TwinsCache struct {
	Count int
	Res   []items.Item
}

Jump to

Keyboard shortcuts

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