db

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DAO

type DAO interface {
	Available() bool
	DuplicateError(err error) bool
	MaxPacketError(err error) bool

	// PutSetting puts a new setting
	PutSetting(k, v string) error
	// GetSetting puts a new setting
	GetSetting(k, def string) (string, error)

	// PutWallet puts a new wallet
	PutWallet(v *types.Wallet) (dup bool, err error)
	// GetWallet gets a wallet by user's public key
	GetWallet(user mint.PublicKey) (*types.Wallet, error)
	// UpdateWallet updates a wallet
	UpdateWallet(v *types.Wallet) error

	// PutDeposit puts a new deposit
	PutDeposit(v *types.Deposit) (dup bool, err error)
	// GetDeposit gets a deposit by ID
	GetDeposit(id uint64) (*types.Deposit, error)
	// GetEnqueuedDeposits gets a list of deposits
	GetEnqueuedDeposits(max uint16) ([]*types.Deposit, error)
	// UpdateDeposit updates a deposit
	UpdateDeposit(v *types.Deposit) error
}

DAO is a DB interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL