Documentation ¶
Index ¶
- Variables
- type Database
- func (d *Database) Available() bool
- func (d *Database) DuplicateError(err error) bool
- func (d *Database) GetDeposit(id uint64) (*types.Deposit, error)
- func (d *Database) GetEnqueuedDeposits(max uint16) ([]*types.Deposit, error)
- func (d *Database) GetSetting(k, def string) (string, error)
- func (d *Database) GetWallet(user mint.PublicKey) (*types.Wallet, error)
- func (d *Database) MaxPacketError(err error) bool
- func (d *Database) PutDeposit(v *types.Deposit) (dup bool, err error)
- func (d *Database) PutSetting(k, v string) error
- func (d *Database) PutWallet(v *types.Wallet) (dup bool, err error)
- func (d *Database) UpdateDeposit(v *types.Deposit) error
- func (d *Database) UpdateWallet(v *types.Wallet) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Migrations = []*gormigrate.Migration{ &gormigrate.Migration{ ID: "2019-09-02T11:39:31.802Z", Migrate: func(tx *gorm.DB) error { return tx. CreateTable(&model.Setting{}). CreateTable(&model.Wallet{}). CreateTable(&model.Deposit{}). AddIndex("ix_deposit_status", "status"). AddIndex("ix_deposit_nextcheckat", "next_check_at"). AddUniqueIndex("ux_deposit_src_tx", "src", "tx"). Error }, Rollback: func(tx *gorm.DB) error { return tx. DropTable(&model.Setting{}). DropTable(&model.Wallet{}). DropTable(&model.Deposit{}). Error }, }, }
Migrations array
Functions ¶
This section is empty.
Types ¶
type Database ¶
Database data
func (*Database) DuplicateError ¶
DuplicateError impl.
func (*Database) GetDeposit ¶
GetDeposit implementation
func (*Database) GetEnqueuedDeposits ¶
GetEnqueuedDeposits implementation
func (*Database) GetSetting ¶
GetSetting implementation
func (*Database) MaxPacketError ¶
MaxPacketError impl.
func (*Database) PutDeposit ¶
PutDeposit implementation
func (*Database) PutSetting ¶
PutSetting implementation
func (*Database) UpdateDeposit ¶
UpdateDeposit implementation
Source Files ¶
Click to show internal directories.
Click to hide internal directories.