Documentation ¶
Index ¶
- type Account
- func DeleteAccount(db *pg.DB, username string) (*Account, error)
- func InsertAccount(db *pg.DB, username, email, qq string) (*Account, error)
- func QueryAccountByEmail(db *pg.DB, email string) (*Account, error)
- func QueryAccountByQQ(db *pg.DB, qq string) (*Account, error)
- func QueryAccountByTelegram(db *pg.DB, telegram string) (*Account, error)
- func QueryAccountByUsername(db *pg.DB, username string) (*Account, error)
- func QueryAccountByUsernames(db *pg.DB, usernames []string) ([]Account, error)
- func UpdateAccountTelegramByUsername(db *pg.DB, username, telegram string) (*Account, error)
- type Package
- type Subscription
- func DeleteSubscription(db *pg.DB, key string) (*Subscription, error)
- func InsertSubscription(db *pg.DB, account, _package string, day time.Duration) (*Subscription, error)
- func QuerySubscriptionByKey(db *pg.DB, key string) (*Subscription, error)
- func QuerySubscriptionExpired(db *pg.DB) ([]Subscription, error)
- func QuerySubscriptionsByUsername(db *pg.DB, username string) ([]Subscription, error)
- func UpdateSubscriptionExpired(db *pg.DB, key string, expired time.Time) (*Subscription, error)
- func UpdateSubscriptionPackage(db *pg.DB, key, _package string) (*Subscription, error)
- func UpdateSubscriptionStatus(db *pg.DB, key, status string) (*Subscription, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { Username string Nickname string Email string QQ string Telegram string Money int Password string database.Table // contains filtered or unexported fields }
func DeleteAccount ¶
func InsertAccount ¶
func QueryAccountByEmail ¶
func QueryAccountByQQ ¶
func QueryAccountByTelegram ¶
func QueryAccountByUsername ¶
func QueryAccountByUsernames ¶
type Package ¶
type Package struct { ID string Name string Description string Nodes []string `pg:",array"` Money int Day int Traffic int Device int database.Table // contains filtered or unexported fields }
func QueryPackageByName ¶
type Subscription ¶
type Subscription struct { Package string Account string Key string UUID string Status string ExpireAt time.Time database.Table // contains filtered or unexported fields }
func DeleteSubscription ¶
func DeleteSubscription(db *pg.DB, key string) (*Subscription, error)
func InsertSubscription ¶
func InsertSubscription(db *pg.DB, account, _package string, day time.Duration) (*Subscription, error)
func QuerySubscriptionByKey ¶
func QuerySubscriptionByKey(db *pg.DB, key string) (*Subscription, error)
func QuerySubscriptionExpired ¶
func QuerySubscriptionExpired(db *pg.DB) ([]Subscription, error)
func QuerySubscriptionsByUsername ¶
func QuerySubscriptionsByUsername(db *pg.DB, username string) ([]Subscription, error)
func UpdateSubscriptionExpired ¶
func UpdateSubscriptionExpired(db *pg.DB, key string, expired time.Time) (*Subscription, error)
func UpdateSubscriptionPackage ¶
func UpdateSubscriptionPackage(db *pg.DB, key, _package string) (*Subscription, error)
func UpdateSubscriptionStatus ¶
func UpdateSubscriptionStatus(db *pg.DB, key, status string) (*Subscription, error)
Click to show internal directories.
Click to hide internal directories.