Documentation ¶
Index ¶
- Variables
- type Database
- func (d *Database) Available() bool
- func (d *Database) DuplicateError(err error) bool
- func (d *Database) GetEnqueuedSendings(max uint16) ([]*types.Sending, error)
- func (d *Database) GetEnqueuedSwaps() ([]*types.Swap, error)
- func (d *Database) GetInitiaitedSendings(max uint16) ([]*types.Sending, error)
- func (d *Database) GetSending(id uint64) (*types.Sending, error)
- func (d *Database) GetSetting(k, def string) (string, error)
- func (d *Database) GetSwap(id uint64) (*types.Swap, error)
- func (d *Database) MaxPacketError(err error) bool
- func (d *Database) PutSending(s *types.Sending) error
- func (d *Database) PutSetting(k, v string) error
- func (d *Database) PutSwap(s *types.Swap) (dup bool, err error)
- func (d *Database) UpdateSending(s *types.Sending) error
- func (d *Database) UpdateSwap(s *types.Swap) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Migrations = []*gormigrate.Migration{ &gormigrate.Migration{ ID: "2019-08-31T13:18:52.719Z", Migrate: func(tx *gorm.DB) error { return tx. CreateTable(&model.Setting{}). CreateTable(&model.Swap{}). AddUniqueIndex("ux_swap_srctx", "src_tx"). AddIndex("ix_swap_status", "status"). CreateTable(&model.Sending{}). Error }, Rollback: func(tx *gorm.DB) error { return tx. DropTable(&model.Setting{}). DropTable(&model.Swap{}). DropTable(&model.Sending{}). Error }, }, }
Migrations array
Functions ¶
This section is empty.
Types ¶
type Database ¶
Database data
func (*Database) DuplicateError ¶
DuplicateError impl.
func (*Database) GetEnqueuedSendings ¶
GetEnqueuedSendings implementation
func (*Database) GetEnqueuedSwaps ¶
GetEnqueuedSwaps implementation
func (*Database) GetInitiaitedSendings ¶
GetInitiaitedSendings implementation
func (*Database) GetSending ¶
GetSending implementation
func (*Database) GetSetting ¶
GetSetting implementation
func (*Database) MaxPacketError ¶
MaxPacketError impl.
func (*Database) PutSending ¶
PutSending implementation
func (*Database) PutSetting ¶
PutSetting implementation
func (*Database) UpdateSending ¶
UpdateSending implementation
Source Files ¶
Click to show internal directories.
Click to hide internal directories.