Documentation
¶
Index ¶
- type BuyTokenTxParams
- type CancelWithdrawTxParams
- type IStore
- type Store
- func (s *Store) BuyTokenTx(ctx context.Context, qtx *db.Queries, arg *BuyTokenTxParams) (*db.Account, error)
- func (s *Store) CancelWithdrawTx(ctx context.Context, arg CancelWithdrawTxParams) error
- func (s *Store) DoUpsertAccountWithTx(ctx context.Context, qtx *db.Queries, arg *UpsertAccountTxParams) (*db.Account, error)
- func (s *Store) GetConn() *pgxpool.Pool
- func (s *Store) UpsertAccountTx(ctx context.Context, arg *UpsertAccountTxParams) (*db.Account, error)
- func (s *Store) WithdrawTx(ctx context.Context, arg WithdrawTxParams) (*db.Withdrawal, error)
- type UpsertAccountTxParams
- type WithdrawTxParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuyTokenTxParams ¶
type BuyTokenTxParams struct {
Req *pb.BuyTokenRequest
BuyerID int64
}
type CancelWithdrawTxParams ¶
type CancelWithdrawTxParams struct {
WithdrawalId int64
}
type Store ¶
func (*Store) BuyTokenTx ¶
func (*Store) CancelWithdrawTx ¶
func (s *Store) CancelWithdrawTx(ctx context.Context, arg CancelWithdrawTxParams) error
func (*Store) DoUpsertAccountWithTx ¶
func (*Store) UpsertAccountTx ¶
func (*Store) WithdrawTx ¶
func (s *Store) WithdrawTx(ctx context.Context, arg WithdrawTxParams) (*db.Withdrawal, error)
Account is not deleted even if all balance is withdrawn. Account is only deleted when expire_time is reached
type UpsertAccountTxParams ¶
type UpsertAccountTxParams struct {
db.UpsertAccountParams
Digest string
Epoch int64
}
type WithdrawTxParams ¶
type WithdrawTxParams struct {
db.StartWithdrawalParams
WithdrawAll bool
}
Click to show internal directories.
Click to hide internal directories.