Documentation ¶
Index ¶
- func GetItem(dbMap *gorp.DbMap, itemID string) interface{}
- func GetPaymentProvider(dbMap *gorp.DbMap, id int) interface{}
- func GetShippingProfile(dbMap *gorp.DbMap, id int) interface{}
- func GetUser(dbMap *gorp.DbMap, user_id int) interface{}
- func InitDB(env string) (*gorp.DbMap, error)
- func NewItem(dbMap *gorp.DbMap, item *Item) interface{}
- type DatabaseConfig
- type DatabaseEnvironment
- type Item
- type PaymentProvider
- type ShippingProfile
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPaymentProvider ¶
func GetPaymentProvider(dbMap *gorp.DbMap, id int) interface{}
func GetShippingProfile ¶
func GetShippingProfile(dbMap *gorp.DbMap, id int) interface{}
Types ¶
type DatabaseConfig ¶
type DatabaseConfig struct {
Environments map[string]DatabaseEnvironment
}
type DatabaseEnvironment ¶
type Item ¶
type Item struct { Id string `json:"id" db:"id"` Name string `json:"name" db:"name"` PurchasePriceCents int `json:"purchase_price_cents" db:"purchase_price_cents"` SalePriceCents int `json:"sale_price_cents" db:"sale_price_cents"` ShippingProfileId int `json:"shipping_profile_id" db:"shipping_profile_id"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` ShippingProfile *ShippingProfile `json:"shipping_profile" db:"-"` }
func GetAllItems ¶
func GetAllItems(dbMap *gorp.DbMap) []Item
func (*Item) CalcPotentialProfit ¶
func (*Item) GetShippingProfile ¶
func (i *Item) GetShippingProfile(dbMap *gorp.DbMap) *ShippingProfile
type PaymentProvider ¶
type PaymentProvider struct { Id int `json:"id" db:"id"` Name string `json:"name" db:"name"` ListingFeeCents int `json:"listing_fee_cents" db:"listing_fee_cents"` PercentageFeeBp int `json:"percentage_fee_bp" db:"percentage_fee_bp"` FlatFeeCents int `json:"flat_fee_cents" db:"flat_fee_cents"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` }
func GetAllPaymentProviders ¶
func GetAllPaymentProviders(dbMap *gorp.DbMap) []PaymentProvider
type ShippingProfile ¶
type ShippingProfile struct { Id int `json:"id" db:"id"` UseId int `json:"user_id" db:"user_id"` User *User `json:"user"` Name string `json:"name" db:"name"` CostInCents int `json:"cost_in_cents" db:"cost_in_cents"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` }
func GetAllShippingProfiles ¶
func GetAllShippingProfiles(dbMap *gorp.DbMap) []ShippingProfile
Click to show internal directories.
Click to hide internal directories.