monoscrapelib

package module
v0.0.0-...-968d595 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: MIT Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchAll

func FetchAll(minProductId, maxProductId, fetchSize int) *treemap.Map

Types

type Item

type Item struct {
	Name       string  `json:"name"`
	Price      float32 `json:"price"`
	Url        string  `json:"url"`
	ProductID  int     `json:"product_id"`
	Available  bool    `json:"available"`
	Rating     float32 `json:"rating"`
	NumReviews int     `json:"num_reviews"`
}

type ItemDocument

type ItemDocument struct {
	Items *treemap.Map      `json:"items"`
	Meta  *ItemDocumentMeta `json:"meta"`
}

func NewItemDocumentWithIntComparator

func NewItemDocumentWithIntComparator() *ItemDocument

func (*ItemDocument) Dump

func (id *ItemDocument) Dump(outFile string)

func (*ItemDocument) RemoveRange

func (id *ItemDocument) RemoveRange(minProductId, maxProductId int)

func (*ItemDocument) UpdateWithItemsFromFile

func (id *ItemDocument) UpdateWithItemsFromFile(inFile string)

func (*ItemDocument) UpdateWithItemsFromItemMap

func (id *ItemDocument) UpdateWithItemsFromItemMap(itemMap *treemap.Map)

type ItemDocumentMeta

type ItemDocumentMeta struct {
	Version   string `json:"version"`
	Timestamp string `json:"timestamp"`
}

Jump to

Keyboard shortcuts

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