data

package
v0.0.0-...-bc218b3 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2015 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DYNAMO_SERVER *ddb.Server
View Source
var LOGGER *log.Logger
View Source
var TEST_TABLE_SUFFIX string

Functions

func DeleteVendorProduct

func DeleteVendorProduct(vpid string, vendorName string) chan error

func GetCurrentTime

func GetCurrentTime(offset int64) int64

func GetInstanceConfig

func GetInstanceConfig(id int64) chan string

func GetLastVendorOffer

func GetLastVendorOffer(vendorProductId string) chan *VendorOffer

func GetProduct

func GetProduct(UPC string) chan *Product

func GetVendorOfferCount

func GetVendorOfferCount(vendorProductId string) chan int64

func GetVendorProduct

func GetVendorProduct(vendorProductId string) chan *VendorProduct

func GetVendorProductList

func GetVendorProductList(afterDate int64) chan map[string]VendorProduct

func PutProduct

func PutProduct(prod Product) chan bool

func PutVendorOffer

func PutVendorOffer(vendorOffer VendorOffer) chan bool

func PutVendorProduct

func PutVendorProduct(vendorProd VendorProduct) chan bool

func SetDynamoConfig

func SetDynamoConfig(accessKey, secretKey, regionText string)

func SetTestTableSuffix

func SetTestTableSuffix(suffix string)

Types

type AvailabilityEnum

type AvailabilityEnum string //"available","unavailable","unknown"

type Product

type Product struct {
	Name             string
	UPC              string
	ProductType      ProductTypeEnum
	VolumetricType   VolumetricTypeEnum
	VolumetricAmount float64
}

type ProductTypeEnum

type ProductTypeEnum string //toothpaste,ketchup,shampoo,laundrydetergent,peanutbutter,clingwrap,toiletpaper,plasticcutlery,paperplates,plasticcups,ziplocbag,trashbags,papertowels,macncheese,napkin

type VendorNameEnum

type VendorNameEnum string //"amazon", "walmart"

type VendorOffer

type VendorOffer struct {
	VendorProductId string
	Price           int
	Date            int64
	Availability    AvailabilityEnum
	HasCoupon       bool
	Msrp            int
}

type VendorProduct

type VendorProduct struct {
	VendorName       VendorNameEnum
	VendorProductId  string
	UPC              string
	Count            int
	LastRetrieveDate int64
}

type VolumetricTypeEnum

type VolumetricTypeEnum string //floz,oz,gram,unit,sqft

Jump to

Keyboard shortcuts

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