Documentation ¶
Index ¶
- func GetPayUrl(id, name string, price float64, notify string) (string, error)
- func NewDecoder() *schema.Decoder
- func VerifyPaySign(query url.Values) bool
- type NotifyQuery
- type Order
- type OrderHandler
- func (this *OrderHandler) CancleById(w http.ResponseWriter, r *http.Request)
- func (this *OrderHandler) ConfirmById(w http.ResponseWriter, r *http.Request)
- func (this *OrderHandler) DeliverById(w http.ResponseWriter, r *http.Request)
- func (this *OrderHandler) Get(w http.ResponseWriter, r *http.Request)
- func (this *OrderHandler) GetById(w http.ResponseWriter, r *http.Request)
- func (this *OrderHandler) Post(w http.ResponseWriter, r *http.Request)
- type OrderQuery
- type Orders
- type PayHandler
- type Product
- type ProductHandler
- func (this *ProductHandler) DelById(w http.ResponseWriter, r *http.Request)
- func (this *ProductHandler) Get(w http.ResponseWriter, r *http.Request)
- func (this *ProductHandler) GetById(w http.ResponseWriter, r *http.Request)
- func (this *ProductHandler) Post(w http.ResponseWriter, r *http.Request)
- func (this *ProductHandler) PutById(w http.ResponseWriter, r *http.Request)
- type ProductQuery
- type Products
- type Shop
- type ShopHandler
- func (this *ShopHandler) Get(w http.ResponseWriter, r *http.Request)
- func (this *ShopHandler) GetById(w http.ResponseWriter, r *http.Request)
- func (this *ShopHandler) GetMyShop(w http.ResponseWriter, r *http.Request)
- func (this *ShopHandler) Post(w http.ResponseWriter, r *http.Request)
- func (this *ShopHandler) PutMyShop(w http.ResponseWriter, r *http.Request)
- type ShopQuery
- type Shops
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDecoder ¶
func VerifyPaySign ¶
Types ¶
type NotifyQuery ¶
type Order ¶
type Order struct { Id bson.ObjectId `json:"id" bson:"_id,omitempty" schema:"-"` Buyer bson.ObjectId `json:"buyer" bson:",omitempty" schema:"-"` State string `json:"state" bson:",omitempty" schema:"-"` Date time.Time `json:"date" schema:"-"` Price float64 `json:"price" schema:"-"` Shop bson.ObjectId `json:"shop" bson:",omitempty"` Contact struct { Name string `json:"name"` Phone string `json:"phone"` Addr string `json:"addr"` } `json:"contact"` Express struct { Code string `json:"code"` Id string `json:"id"` } `json:"express"` Items []struct { Id bson.ObjectId `json:"id"` Spec string `json:"spec"` Quantity int `json:"quantity"` Name string `json:"name"` Price float64 `json:"price"` } `json:"items"` }
type OrderHandler ¶
type OrderHandler struct { Sess *mgo.Session Db string }
func (*OrderHandler) CancleById ¶
func (this *OrderHandler) CancleById(w http.ResponseWriter, r *http.Request)
func (*OrderHandler) ConfirmById ¶
func (this *OrderHandler) ConfirmById(w http.ResponseWriter, r *http.Request)
func (*OrderHandler) DeliverById ¶
func (this *OrderHandler) DeliverById(w http.ResponseWriter, r *http.Request)
func (*OrderHandler) Get ¶
func (this *OrderHandler) Get(w http.ResponseWriter, r *http.Request)
func (*OrderHandler) GetById ¶
func (this *OrderHandler) GetById(w http.ResponseWriter, r *http.Request)
func (*OrderHandler) Post ¶
func (this *OrderHandler) Post(w http.ResponseWriter, r *http.Request)
type PayHandler ¶
type PayHandler struct { Sess *mgo.Session Db string }
func (*PayHandler) Notify ¶
func (this *PayHandler) Notify(w http.ResponseWriter, r *http.Request)
func (*PayHandler) RedirectById ¶
func (this *PayHandler) RedirectById(w http.ResponseWriter, r *http.Request)
type Product ¶
type Product struct { Id bson.ObjectId `json:"id" bson:"_id,omitempty" schema:"-"` Shop bson.ObjectId `json:"shop" bson:",omitempty" schema:"-"` Date time.Time `json:"date" bson:",omitempty" schema:"-"` Name string `json:"name" validate:"min=1,max=40"` Images []string `json:"images"` Price float64 `json:"price"` Inventory int `json:"inventory"` Active bool `json:"active"` Info string `json:"info,omitempty"` Props []struct { Name string `json:"name"` Value string `json:"value"` } `json:"props,omitempty"` Spec []struct { Name string `json:"name"` Value []string `json:"value"` } `json:"spec,omitempty"` }
type ProductHandler ¶
type ProductHandler struct { Sess *mgo.Session Db string }
func (*ProductHandler) DelById ¶
func (this *ProductHandler) DelById(w http.ResponseWriter, r *http.Request)
func (*ProductHandler) Get ¶
func (this *ProductHandler) Get(w http.ResponseWriter, r *http.Request)
func (*ProductHandler) GetById ¶
func (this *ProductHandler) GetById(w http.ResponseWriter, r *http.Request)
func (*ProductHandler) Post ¶
func (this *ProductHandler) Post(w http.ResponseWriter, r *http.Request)
func (*ProductHandler) PutById ¶
func (this *ProductHandler) PutById(w http.ResponseWriter, r *http.Request)
type ProductQuery ¶
type Shop ¶
type Shop struct { Id bson.ObjectId `json:"id" bson:"_id,omitempty" schema:"-"` Owner bson.ObjectId `json:"owner" bson:",omitempty" schema:"-"` Date time.Time `json:"date" bson:",omitempty" schema:"-"` Name string `json:"name" validate:"min=3,max=40"` Active bool `json:"active"` Info string `json:"info,omitempty"` }
type ShopHandler ¶
type ShopHandler struct { Sess *mgo.Session Db string }
func (*ShopHandler) Get ¶
func (this *ShopHandler) Get(w http.ResponseWriter, r *http.Request)
func (*ShopHandler) GetById ¶
func (this *ShopHandler) GetById(w http.ResponseWriter, r *http.Request)
func (*ShopHandler) GetMyShop ¶
func (this *ShopHandler) GetMyShop(w http.ResponseWriter, r *http.Request)
func (*ShopHandler) Post ¶
func (this *ShopHandler) Post(w http.ResponseWriter, r *http.Request)
func (*ShopHandler) PutMyShop ¶
func (this *ShopHandler) PutMyShop(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.