Documentation ¶
Index ¶
- func AutoMigrate()
- func CreatePurchase(purchase *models.Purchase) error
- func GetAllPackages() ([]*models.Package, error)
- func GetAllUsers() ([]*models.Tuser, error)
- func GetKeyVal(key string) ([]*models.Keyval, error)
- func GetPackage(name string) (*models.Package, error)
- func GetPurchaseById(id int64) (*models.Purchase, error)
- func GetUser(userId int64) (*models.Tuser, error)
- func GetUserByTid(uid uint64) (*models.Tuser, error)
- func GetUserByToken(token string) (*models.Tuser, error)
- func GetXNodes() ([]*models.Xnode, error)
- func InsertPurchase(purchase *models.Purchase) error
- func LastPurchasesByUserId(uid int64, status PurchaseStatus) (*models.Purchase, error)
- func SaveOrUpdateUser(u *models.Tuser) error
- func SaveOrUpdateXNode(node *models.Xnode) error
- func SetKeyVal(key, value string) error
- func SetPurchaseAsProcessing(purchase *models.Purchase) error
- func SetupDb(dsn string)
- func SetupPackage()
- func UpdatePurchase(p *models.Purchase) error
- func UpdateUser(u *models.Tuser) error
- type PurchaseStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoMigrate ¶ added in v0.1.3
func AutoMigrate()
func CreatePurchase ¶ added in v0.4.1
CreatePurchase creates a new order purchase and will cancel previous unprocessed purchases
func GetAllPackages ¶ added in v0.3.1
func GetAllUsers ¶ added in v0.2.1
func InsertPurchase ¶ added in v0.3.1
func LastPurchasesByUserId ¶ added in v0.3.1
func LastPurchasesByUserId(uid int64, status PurchaseStatus) (*models.Purchase, error)
func SaveOrUpdateUser ¶
func SaveOrUpdateXNode ¶
func SetPurchaseAsProcessing ¶ added in v0.3.1
func SetupPackage ¶
func SetupPackage()
func UpdatePurchase ¶ added in v0.3.1
func UpdateUser ¶
Types ¶
type PurchaseStatus ¶ added in v0.3.1
type PurchaseStatus int64
const ( PurchaseUnknown PurchaseStatus = iota PurchaseConfirmed PurchaseIsProcessing PurchaseRejected PurchaseCancelled PurchaseWaitingForBankCallback )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.