grab_handler

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCacheProductCategory

func CreateCacheProductCategory(namespace string, product *ProductCategoryGrabResp) mongorepo.CacheProduct

func CreateCacheProductSearch

func CreateCacheProductSearch(namespace string, product *ProductListGrabberResp) mongorepo.CacheProduct

func CreateCacheProductShop

func CreateCacheProductShop(namespace string, product *ShopGrabberResp) mongorepo.CacheProduct

func CreateCacheProductUrl

func CreateCacheProductUrl(namespace string, product *UrlGrabberResp) mongorepo.CacheProduct

Types

type CacheProductHandler

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

func NewCacheProductHandler

func NewCacheProductHandler(repo *mongorepo.ProductRepo) *CacheProductHandler

func (*CacheProductHandler) AddItemProductCategory

func (handler *CacheProductHandler) AddItemProductCategory(namespace string, source *ProductCategoryGrabResp) error

func (*CacheProductHandler) AddItemProductSearch

func (handler *CacheProductHandler) AddItemProductSearch(namespace string, source *ProductListGrabberResp) error

func (*CacheProductHandler) AddItemProductShop

func (handler *CacheProductHandler) AddItemProductShop(namespace string, source *ShopGrabberResp) error

func (*CacheProductHandler) AddItemProductUrl

func (handler *CacheProductHandler) AddItemProductUrl(namespace string, source *UrlGrabberResp) error

type ProductCategoryGrabResp

type ProductCategoryGrabResp struct {
	ProductCategory model_public.CategoryProduct
	ProductDetail   model_public.PdpGetlayoutQueryResp
}

type ProductListGrabberResp

type ProductListGrabberResp struct {
	Product       model_public.ProductSearch
	ProductDetail model_public.PdpGetlayoutQueryResp
}

type ProductParser

type ProductParser struct {
	ShopId         int
	ProductId      int
	CatId          int
	ProductSold    int
	Stock          int
	ProductContent model_public.ProductContentComponent
	ProductDetail  model_public.ProductDetailComponent
	ProductMedia   model_public.MediaComponent
	ProductDesc    model_public.ProductDetailContent
	Images         []string
	Category       []int64
	Categories     []mongorepo.ProductCategory
}

type ShopGrabberResp

type ShopGrabberResp struct {
	Shop    model_public.ShopCoreInfoResp
	Product model_public.PdpGetlayoutQueryResp
}

type UrlGrabberResp

type UrlGrabberResp struct {
	Product   *model_public.PdpGetlayoutQueryResp
	ProductP2 *model_public.PdpGetDataP2Resp
}

Jump to

Keyboard shortcuts

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