Documentation ¶
Index ¶
- type BS
- type BSErr
- type Cart
- type Category
- type Counter
- type Cust
- type CustDatabase
- type DS
- func (ds *DS) Add(v interface{}, n ...int64) (int64, error)
- func (ds *DS) AddCust(custy *Cust) (int64, error)
- func (ds *DS) AddwParent(parent interface{}, child interface{}, offset int64) error
- func (ds *DS) Close() error
- func (ds *DS) DeleteCust(id int64) error
- func (ds *DS) Get(v interface{}) error
- func (ds *DS) GetCust(id int64) (*Cust, error)
- func (ds *DS) GetCustKey(email string) (*Cust, *datastore.Key, error)
- func (ds *DS) GetCustwEmail(email string) (*Cust, error)
- func (ds *DS) ListCusts() ([]*Cust, error)
- func (ds *DS) UpdateCust(custy *Cust) error
- type DSErr
- type Good
- type GoodDatabase
- type GoodDeets
- type Order
- type RelatedGoods
- type Render
- type Render1
- type Render2
- type Render3
- type Render4
- type Render40
- type Render5
- type Render6
- type Render7
- type Sheep
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cust ¶
type Cust struct { Id int64 `json:"id"` // 10,000-99,999 Email string `json:"email"` Password string `json:"password"` Firstname string `json:"firstname"` Lastname string `json:"lastname"` Birthdate time.Time `json:"birthdate"` Meterid int64 `json:"meterid"` Addr string `json:"addr"` Street string `json:"street"` Area string `json:"area"` City string `json:"city"` Postcode string `json:"postcode"` State string `json:"state"` Country string `json:"country"` Phone string `json:"phone"` Indi bool `json:"indi"` //Individual or not (company) Company string `json:"company"` Vat string `json:"vat"` Pmtmethod string `json:"pmtmethod"` Crtid int64 `json:"cartid"` //current cart 100,000-999,999 }
type CustDatabase ¶
type CustDatabase interface { ListCusts() ([]*Cust, error) AddCust(custy *Cust) (int64, error) //create GetCust(id int64) (*Cust, error) //retrieve by id GetCustwEmail(email string) (*Cust, error) //retrieve by email GetCustKey(email string) (*Cust, *datastore.Key, error) UpdateCust(custy *Cust) error //update DeleteCust(id int64) error //delete Close() error }
type DS ¶
type DS struct {
// contains filtered or unexported fields
}
func (*DS) AddwParent ¶
func (*DS) DeleteCust ¶
func (*DS) UpdateCust ¶
type Good ¶
type Good struct { Id int64 `json:"id,string" schema:"-"` //1,000-9,999 Code string `json:"code" schema:"code"` Category string `json:"category" schema:"category"` Subcategory string `json:"subCategory" schema:"subcategory"` Brand string `json:"brand" schema:"brand"` Desc string `json:"desc" schema:"desc"` Price float64 `json:"price,string" schema:"price"` Url string `json:"url" schema:"url"` Urlimg string `json:"urlImg" schema:"urlImg"` Featured bool `json:"featured,string" schema:"featured"` Hidden bool `json:"hidden,string" schema:"hidden"` Deets GoodDeets `json:"goodDeets" schema:"Deets"` }
type GoodDatabase ¶
type GoodDeets ¶
type GoodDeets struct { //Id int64 `json:"id"` DescDetails string `json:"descDetails" schema:"descDetails"` //path to file with details Tax float64 `json:"tax,string" schema:"tax"` //percent Price float64 `json:"price,string" schema:"price"` Stock int `json:"stock,string" schema:"stock"` Related []int64 `json:"related" cap:"6" schema:"-"` Prices []float64 `json:"prices" cap:"6" schema:"-"` Volumes []int `json:"volumes" cap:"6" schema:"-"` //PriceVolume map[int]float64 `json:"priceVolume"` ParameterNames []string `json:"parameterNames" cap:"12" schema:"-"` ParameterValues []string `json:"parameterValues" cap:"12" schema:"-"` //Parameters map[string]string `json:"parameters"` Features []string `json:"features" cap:"12" schema:"-"` Items []string `json:"items" cap:"6" schema:"-"` UrlImgs1 string `json:"urlImgs1" schema:"urlImgs"` UrlImgs2 string `json:"urlImgs2" schema:"-"` UrlImgs3 string `json:"urlImgs3" schema:"-"` UrlFile string `json:"urlFile" schema:"urlFile"` }
type Order ¶
type Order struct { Id int64 `json:"id"` //1,000,000-9,999,999 TxId string `json:"txid"` TxRefNo string `json:"txrefno"` TxStatus string `json:"txstatus"` TxMsg string `json:"txmsg"` PgTxnNo string `json:"pgtxnno"` IssuerRefNo string `json:"issuerrefno"` AuthIdCode string `json:"authidcode"` PgRespCode string `json:"pgrespcode"` OriginalAmount string `json:"originalamount "` AdjustedAmount string `json:"adjustedamount "` DpRuleName string `json:"dprulename "` DpRuleType string `json:"dpruletype "` Amount string `json:"amount "` TransactionAmount string `json:"transactionamount "` PaymentMode string `json:"paymentmode "` TxGateway string `json:"txgateway "` IssuerCode string `json:"issuercode "` TxnDateTime string `json:"txndatetime "` IsCOD string `json:"iscod "` //Details of un-registered buyer FirstName string `json:"firstname "` LastName string `json:"lastname "` AddressStreet1 string `json:"addressstreet1 "` AddressStreet2 string `json:"addressstreet2 "` AddressFirstName string `json:"addressfirstname "` AddressZip string `json:"addresszip "` AddressState string `json:"addressstate "` AddressCountry string `json:"addresscountry "` MobileNo string `json:"mobileno "` Email string `json:"email "` //user account if buyer registered //Buyer *Cust //`json:"buyer"` //Cart Cart `json:"cart"` ReqTime time.Time `json:"reqTime"` SecSign string `json:"secSign"` Cstid int64 `json:"cstid"` //completed cart buyer Crtid int64 `json:"cartid"` //completed cart id Notified bool `json:"boolean"` }
type RelatedGoods ¶
type Render ¶
type Render struct { Message string `json:"message"` Cstmr Cust `json:"cstmr"` Goods []Good `json:"goods,string"` Categories []Category `json:"categories,string"` }
rendering structs
type Sheep ¶
type Sheep struct { Name string `json:"name"` Email string `json:"email"` Addr string `json:"addr"` Phon string `json:"phon"` Area string `json:"area"` Note string `json:"note"` JDte time.Time `json:"jdte"` Confirmed bool `json:"conf"` }
datastore structs Good-4 Cust-5 Cart-6 Order-7 GoodDeets-8 CartsPurchased-9
Source Files ¶
Click to show internal directories.
Click to hide internal directories.