docgen

package
v0.0.0-...-c227d16 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: Unlicense Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Docgen

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

func Init

func Init() *Docgen

func (*Docgen) BulkGenerate

func (d *Docgen) BulkGenerate(count int) []Document

func (*Docgen) GetExistKey

func (d *Docgen) GetExistKey(action string) int

func (*Docgen) GetRandomProduct

func (d *Docgen) GetRandomProduct() Product

func (*Docgen) InitMapArr

func (d *Docgen) InitMapArr(ids []int)

func (*Docgen) UpdateArr

func (d *Docgen) UpdateArr()

type Document

type Document struct {
	ID               int     `json:"id"`
	ProductTitle     string  `json:"product_title"`
	ItemID           int     `json:"item_id"`
	CreatedUnix      int64   `json:"created_unix"`
	CreatedWeek      string  `json:"created_week"`
	CategoryID       int64   `json:"category_id"`
	CategoryName     string  `json:"category_name"`
	ProductCondition int     `json:"product_condition"`
	WidthImage       int     `json:"width_image"`
	HeightImage      int     `json:"height_image"`
	ImageURL         string  `json:"image"`
	Price            float64 `json:"price"`
	FinalPrice       float64 `json:"final_price"`
	DiscountPercent  float64 `json:"discount_percentage"`
	ScoreDoc         float64 `json:"score_doc"`
	CTR              float64 `json:"ctr"`
	PriceBid         int     `json:"price_bid"`
	IsCashback       bool    `json:"is_cashback"`
	IsFreeshipping   bool    `json:"is_freeshipping"`
	IsLocal          bool    `json:"is_local"`
	MinimumOrder     int     `json:"minimum_order"`
	ProvinceID       int     `json:"province_id"`
	ProvinceName     string  `json:"province_name"`
	CityID           int     `json:"city_id"`
	CityName         string  `json:"city_name"`
	DistrictID       int     `json:"district_id"`
	DistrictName     string  `json:"district_name"`
	Latitude         float64 `json:"lat"`
	Longitude        float64 `json:"long"`
	ShopName         string  `json:"shop_name"`
	ShopID           int64   `json:"shop_id"`
	ShopTier         int     `json:"shop_tier"`
	Rating           float64 `json:"rating"`
	Review           int     `json:"review"`
	WeightGram       int     `json:"weight_gram"`
}

type Location

type Location struct {
	DistrictID   int
	DistrictName string
	Latitude     float64
	Longitude    float64
	CityID       int
	CityName     string
	ProvinceID   int
	ProvinceName string
}

type Product

type Product struct {
	Name           string
	CategoriesName string
	CategoriesID   int64
}

Product struct represents the structure of each product

type Shop

type Shop struct {
	ID   int
	Name string
	Loc  Location
}

Jump to

Keyboard shortcuts

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