product

package
v0.0.0-...-1dfaa38 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	COLLECTION = "products"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Product

type Product struct {
	ID          bson.ObjectId `bson:"_id,omitempty" json:"id,omitempty"`
	ProductID   int           `bson:"product_id" json:"product_id"`
	Link        string        `bson:"link" json:"link"`
	Category    string        `bson:"category" json:"category"`
	Brand       string        `bson:"brand" json:"brand"`
	Name        string        `bson:"name" json:"name"`
	Fullname    string        `bson:"full_name" json:"full_name"`
	Specialname string        `bson:"special_name" json:"special_name"`
	Vendorname  string        `bson:"vendor_name" json:"vendor_name"`
	Description string        `bson:"description" json:"description"`
}

Product Represents a product, we uses bson keyword to tell the mgo driver how to name the properties in mongodb document

type Products

type Products []Product

func (*Products) BulkUpsertWithIndex

func (xp *Products) BulkUpsertWithIndex() error

func (*Products) Count

func (p *Products) Count() (int, error)

Jump to

Keyboard shortcuts

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