Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToCategories ¶
func ToCategories(baseUrl string, breadcrumb []Breadcrumb) []*v1.Category
Types ¶
type Breadcrumb ¶
func (Breadcrumb) ToCategory ¶
func (b Breadcrumb) ToCategory(baseUrl string) *v1.Category
type DigikalaFetcher ¶
type DigikalaFetcher struct {
// contains filtered or unexported fields
}
func NewDigikalaFetcher ¶
func NewDigikalaFetcher( baseUrl string, apiBaseUrl string, client *resty.Client, redisClient *redis.Client, maxRetry int, concurrencyFactor int, ) DigikalaFetcher
func (DigikalaFetcher) AsyncFetch ¶ added in v0.2.0
func (f DigikalaFetcher) AsyncFetch(ctx context.Context, products []rank.Product, count int) chan *ProductWithError
type DigikalaProduct ¶
type DigikalaProduct struct { Data struct { Product struct { IsInactive bool `json:"is_inactive"` TitleFa string `json:"title_fa"` Url struct { Uri string `json:"uri"` } `json:"url"` Status string `json:"status"` Images struct { Main struct { Url []string `json:"url"` } } `json:"images"` Rating struct { Rate int32 `json:"rate"` Count int32 `json:"count"` } `json:"rating"` Breadcrumb []Breadcrumb `json:"breadcrumb"` DefaultVariant Variant `json:"default_variant"` } } }
type ProductWithError ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.