Documentation ¶
Index ¶
- type AddFeedbackPayload
- type FeedbackService
- type PoolInfo
- type UserAction
- type UserActionDB
- type UserActionService
- type UserDB
- type UserPoolBalances
- type UserPoolWallet
- type UserPoolWallets
- type UserPoolWorker
- type UserPoolWorkers
- type UserService
- func (s *UserService) Find(ctx context.Context, id int64) (*UserDB, error)
- func (s *UserService) Init(ctx context.Context, botUser *models.User, chatID int64) (*UserDB, error)
- func (s *UserService) SetBlocksNotify(ctx context.Context, id int64, value bool) error
- func (s *UserService) SetLang(ctx context.Context, id int64, languageTag language.Tag) error
- func (s *UserService) SetPayoutsNotify(ctx context.Context, id int64, value bool) error
- type UserWalletInfo
- type UserWalletService
- func (w *UserWalletService) Add(ctx context.Context, userID int64, coin, wallet string) error
- func (w *UserWalletService) CheckDuplicates(ctx context.Context, userID int64, coin, wallet string) (bool, error)
- func (w *UserWalletService) Count(ctx context.Context, userID int64, coin string) (int, error)
- func (w *UserWalletService) FindBlockchainWallets(ctx context.Context, userID int64, coin string) ([]UserWalletInfo, error)
- func (w *UserWalletService) FindBlockchains(ctx context.Context, userID int64) ([]blockchains.BlockchainInfo, error)
- func (w *UserWalletService) FindWallets(ctx context.Context, userID int64) ([]UserPoolWallet, error)
- func (w *UserWalletService) FindWorkers(ctx context.Context, userID int64) ([]UserPoolWorker, error)
- func (w *UserWalletService) Remove(ctx context.Context, id int64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddFeedbackPayload ¶
type FeedbackService ¶
type FeedbackService struct {
// contains filtered or unexported fields
}
func NewFeedbackService ¶
func NewFeedbackService(pgConn *sqlx.DB) *FeedbackService
func (*FeedbackService) Add ¶
func (f *FeedbackService) Add(ctx context.Context, userID int64, payload *AddFeedbackPayload) error
type PoolInfo ¶
type PoolInfo struct { Blockchain *blockchains.BlockchainInfo Host string MinPayout *uint64 }
type UserAction ¶
type UserAction string
const ( UserAddWalletAction UserAction = "add_wallet" ReportBugAction UserAction = "report_bug" )
func (UserAction) Scan ¶
func (ua UserAction) Scan(val any) error
type UserActionDB ¶
type UserActionDB struct { UserID int64 `db:"user_id"` Action UserAction `db:"action"` Payload *string `db:"payload"` }
type UserActionService ¶
type UserActionService struct {
// contains filtered or unexported fields
}
func NewUserActionService ¶
func NewUserActionService(pgConn *sqlx.DB) *UserActionService
func (*UserActionService) Clear ¶
func (a *UserActionService) Clear(ctx context.Context, userID int64) error
func (*UserActionService) Get ¶
func (a *UserActionService) Get(ctx context.Context, userID int64) (*UserActionDB, error)
func (*UserActionService) Set ¶
func (a *UserActionService) Set(ctx context.Context, userID int64, action UserAction, payload *string) error
type UserPoolBalances ¶
type UserPoolBalances struct { Coin string Balances map[string]*poolPayoutsProto.MinerBalance }
type UserPoolWallet ¶
type UserPoolWallets ¶
type UserPoolWallets struct { Pool *PoolInfo Wallets []UserWalletInfo }
type UserPoolWorker ¶
type UserPoolWorkers ¶
type UserPoolWorkers struct { Coin string Workers map[string]*poolMinersProto.MinerWorkers }
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(pgConn *sqlx.DB) *UserService
func (*UserService) SetBlocksNotify ¶
func (*UserService) SetPayoutsNotify ¶
type UserWalletService ¶
type UserWalletService struct {
// contains filtered or unexported fields
}
func NewUserWalletService ¶
func NewUserWalletService(pgConn *sqlx.DB, blockchainsService *blockchains.Service) *UserWalletService
func (*UserWalletService) CheckDuplicates ¶
func (*UserWalletService) FindBlockchainWallets ¶
func (w *UserWalletService) FindBlockchainWallets(ctx context.Context, userID int64, coin string) ([]UserWalletInfo, error)
func (*UserWalletService) FindBlockchains ¶
func (w *UserWalletService) FindBlockchains(ctx context.Context, userID int64) ([]blockchains.BlockchainInfo, error)
func (*UserWalletService) FindWallets ¶
func (w *UserWalletService) FindWallets(ctx context.Context, userID int64) ([]UserPoolWallet, error)
func (*UserWalletService) FindWorkers ¶
func (w *UserWalletService) FindWorkers(ctx context.Context, userID int64) ([]UserPoolWorker, error)
Click to show internal directories.
Click to hide internal directories.