Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidEmail = errors.New(`Invalid email`) ErrNotFilled = errors.New(`Blank email`) ErrorProductNameNotFilled = errors.New(`Blank product name`) ErrorProductImgNotFilled = errors.New(`Blank product image`) ErrorProductDescriptionNotFilled = errors.New(`Blank product description`) ErrorProductPriceNotFilled = errors.New(`Blank product price`) ErrorProductPriceUnitNotFilled = errors.New(`Blank product price-unit`) )
View Source
var (
EmailRegexp = regexp.MustCompile(`^[a-z0-9._%+\-]+@[a-z0-9.\-]+\.[a-z]{2,4}$`)
)
Functions ¶
This section is empty.
Types ¶
type Product ¶
type Product struct {
//BaseModel
Id bson.ObjectId `json:"id" bson:"_id,omitempty"`
Name string `json:"name" bson:"name"`
Img string `json:"img" bson:"img"`
Description string `json:"description" bson:"description"`
Price string `json:"price" bson:"price"`
PriceUnit string `json:"price_unit" bson:"price_unit"`
}
type User ¶
type Wish ¶
type Wish struct {
//BaseModel
Id bson.ObjectId `json:"id" bson:"_id,omitempty"`
Product bson.ObjectId `json:"product_id" bson:"product_id"`
UserEmail string `json:"-" bson:"user_email"`
Name string `json:"name" bson:"name"`
Img string `json:"img" bson:"img"`
Description string `json:"description" bson:"description"`
Price string `json:"price" bson:"price"`
PriceUnit string `json:"price_unit" bson:"price_unit"`
Timestamp time.Time `json:"creation_time" bson:"creation_time,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.