productdata

package
v0.0.0-...-de2618e Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateProductDataMap

func CreateProductDataMap(url string) (map[string]ProductMetadata, error)

CreateProductDataMap builds a map[string] based of array of gtin for search efficiency

Types

type ProdData

type ProdData struct {
	Sku         string            `json:"sku"`
	ProductList []ProductMetadata `json:"productList"`
}

ProdData represents the product data schema in the database

func MakeGetCallToSkuMapping

func MakeGetCallToSkuMapping(url string) ([]ProdData, error)

type ProductMetadata

type ProductMetadata struct {
	ProductID        string                 `json:"productId"`
	BeingRead        float64                `json:"beingRead"`
	BecomingReadable float64                `json:"becomingReadable"`
	ExitError        float64                `json:"exitError"`
	DailyTurn        float64                `json:"dailyTurn"`
	Metadata         map[string]interface{} `json:"metadata"`
}

ProductMetadata represents the ProductList schema attribute in the database

type Result

type Result struct {
	ProdData []ProdData `json:"results"`
}

Result

Jump to

Keyboard shortcuts

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