Documentation ¶
Index ¶
- func BatchShopCore[T ShopCoreItem](ctxErr *ContextError, itemsChan <-chan []T, limitTask int, limitChan int, ...) (<-chan []T, error)
- func BatchShopStatistic[T ShopCoreItem](ctxErr *ContextError, itemsChan <-chan []T, limitTask int, limitChan int, ...) (<-chan []T, error)
- func GetBatchLayout(api *api_public.TokopediaApiPublic, ctx context.Context, urls []string, ...) (err error)
- func IterateCategoryCsv(base *legacy_source.BaseConfig, handler CategoryCsvHandler) error
- func IterateKeywords(fname string, handler KeywordHandler) error
- func IterateProductShopPage(api *api_public.TokopediaApiPublic, ctx context.Context, ...) error
- func IterateSearchPage(cfg *IterateConfig, api *api_public.TokopediaApiPublic, ctx context.Context, ...) error
- func IterateShops(api *api_public.TokopediaApiPublic, fname string, handler ShopHandler) error
- func IterateUrls(fname string, handler UrlHandler) error
- func V2GetBatchLayout(searchItem <-chan []*model_public.ProductSearch, limit int, taskcount int, ...) (<-chan *model_public.PdpGetlayoutQueryResp, error)
- func V2IterateSearchPage(ctxErr *ContextError, chunkSize int, api *api_public.TokopediaApiPublic, ...) (<-chan []*model_public.ProductSearch, error)
- type BatchLayoutHandler
- type CategoryCsvHandler
- type ContextError
- type IterateConfig
- type KeywordHandler
- type ProductShopHandler
- type SearchPageHandler
- type ShopCoreItem
- type ShopHandler
- type UrlHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchShopCore ¶ added in v1.1.32
func BatchShopCore[T ShopCoreItem]( ctxErr *ContextError, itemsChan <-chan []T, limitTask int, limitChan int, api *api_public.TokopediaApiPublic, ) (<-chan []T, error)
func BatchShopStatistic ¶ added in v1.1.32
func BatchShopStatistic[T ShopCoreItem]( ctxErr *ContextError, itemsChan <-chan []T, limitTask int, limitChan int, api *api_public.TokopediaApiPublic, ) (<-chan []T, error)
func GetBatchLayout ¶ added in v1.1.31
func GetBatchLayout( api *api_public.TokopediaApiPublic, ctx context.Context, urls []string, handler BatchLayoutHandler, ) (err error)
deprecated
func IterateCategoryCsv ¶
func IterateCategoryCsv(base *legacy_source.BaseConfig, handler CategoryCsvHandler) error
func IterateKeywords ¶
func IterateKeywords(fname string, handler KeywordHandler) error
func IterateProductShopPage ¶
func IterateProductShopPage( api *api_public.TokopediaApiPublic, ctx context.Context, searchVar *model_public.ShopProductVar, handler ProductShopHandler, ) error
func IterateSearchPage ¶
func IterateSearchPage( cfg *IterateConfig, api *api_public.TokopediaApiPublic, ctx context.Context, searchVar *model_public.SearchProductVar, handler SearchPageHandler, ) error
deprecated
func IterateShops ¶
func IterateShops(api *api_public.TokopediaApiPublic, fname string, handler ShopHandler) error
func IterateUrls ¶
func IterateUrls(fname string, handler UrlHandler) error
func V2GetBatchLayout ¶ added in v1.1.31
func V2GetBatchLayout( searchItem <-chan []*model_public.ProductSearch, limit int, taskcount int, ctxErr *ContextError, api *api_public.TokopediaApiPublic, ) (<-chan *model_public.PdpGetlayoutQueryResp, error)
func V2IterateSearchPage ¶ added in v1.1.31
func V2IterateSearchPage( ctxErr *ContextError, chunkSize int, api *api_public.TokopediaApiPublic, searchVar *model_public.SearchProductVar, ) (<-chan []*model_public.ProductSearch, error)
Types ¶
type BatchLayoutHandler ¶
type BatchLayoutHandler func(layout *model_public.PdpGetlayoutQueryResp) error
type CategoryCsvHandler ¶
type CategoryCsvHandler func(item *csv.CategoryCsv) error
type ContextError ¶ added in v1.1.31
type ContextError struct { Ctx context.Context Err error Cancel context.CancelFunc }
func NewContextError ¶ added in v1.1.31
func NewContextError() *ContextError
func (*ContextError) SendError ¶ added in v1.1.31
func (ctx *ContextError) SendError(err error)
type IterateConfig ¶ added in v1.1.31
type KeywordHandler ¶
type ProductShopHandler ¶
type ProductShopHandler func(items []*model_public.ShopProductData) error
type SearchPageHandler ¶
type SearchPageHandler func(items []*model_public.ProductSearch) error
type ShopCoreItem ¶ added in v1.1.32
type ShopCoreItem interface { GetShopUrl() string SetShopCore(data *model_public.ShopCoreInfoResp) error GetShopID() int SetStatistic(data *model_public.ShopStatisticQueryResp) error }
type ShopHandler ¶
type ShopHandler func(shopCore *model_public.ShopCoreInfoResp) error
type UrlHandler ¶
Click to show internal directories.
Click to hide internal directories.