stores

package
v0.0.0-...-cbaa3f3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasketAdd

func BasketAdd(db *gorp.DbMap, userid, storeid, productid, count int64) error

func BasketClean

func BasketClean(db *gorp.DbMap, userid, storeid int64) error

func BasketRemove

func BasketRemove(db *gorp.DbMap, userid, storeid, productid int64) error

Types

type Store

type Store struct {
	Id      int64
	Title   string
	Website string

	Created int64
	Updated int64
	Deleted int64
	Version int64
}

func CreateStore

func CreateStore(db *gorp.DbMap, title, website string) (Store, error)

type StoreBasket

type StoreBasket struct {
	Id        int64
	UserId    int64
	StoreId   int64
	ProductId int64
	Count     int64

	Created int64
	Updated int64
}

func BasketGet

func BasketGet(db *gorp.DbMap, userid, storeid int64) ([]StoreBasket, error)

type StoreProduct

type StoreProduct struct {
	Id        int64
	StoreId   int64
	ProductId int64
	Title     string
	Price     float64
	ImgId     int64

	Created int64
	Updated int64
}

func CreateProduct

func CreateProduct(db *gorp.DbMap, storeid, ownproductid, imgid int64,
	price float64, title string) (StoreProduct, error)

func GetProduct

func GetProduct(db *gorp.DbMap, productid int64) (StoreProduct, error)

func (*StoreProduct) Update

func (p *StoreProduct) Update(db *gorp.DbMap) error

Jump to

Keyboard shortcuts

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