Documentation ¶
Index ¶
- type Storage
- func (s Storage) GetDrawingNeededGames() ([]models.Game, error)
- func (s Storage) GetGames(limit, offset int64) ([]models.Game, error)
- func (s Storage) GetLatestBlock() (models.Block, error)
- func (s Storage) GetTransactionsByGameOfs(gameOfs ...time.Time) ([]models.Transaction, error)
- func (s Storage) GetUnconfirmedTransactions(confirmations int64) ([]models.Transaction, error)
- func (s Storage) SaveBlockAndTransactions(gameOf time.Time, block models.Block, transactions []models.Transaction, ...) error
- func (s *Storage) SetMaxIdleConns(n int)
- func (s *Storage) SetMaxOpenConns(n int)
- func (s Storage) UpdateGameToEndedStatus(game models.Game) error
- func (s Storage) UpdateTransactionConfirmationByID(id int64, confirmations int64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage implements Storage interface for data storage
func (Storage) GetDrawingNeededGames ¶
GetDrawingNeededGames gets all drawing games
func (Storage) GetLatestBlock ¶
GetLatestBlock gets latest models.Block
func (Storage) GetTransactionsByGameOfs ¶
GetTransactionsByGameOfs gets all transactions, filter by game_of
func (Storage) GetUnconfirmedTransactions ¶
func (s Storage) GetUnconfirmedTransactions(confirmations int64) ([]models.Transaction, error)
GetUnconfirmedTransactions gets all unconfirmed transactions
func (Storage) SaveBlockAndTransactions ¶
func (s Storage) SaveBlockAndTransactions(gameOf time.Time, block models.Block, transactions []models.Transaction, game *models.Game) error
SaveBlockAndTransactions save block and transactions
func (*Storage) SetMaxIdleConns ¶
SetMaxIdleConns alias sql.DB.SetMaxIdleConns
func (*Storage) SetMaxOpenConns ¶
SetMaxOpenConns alias sql.DB.SetMaxOpenConns
func (Storage) UpdateGameToEndedStatus ¶
UpdateGameToEndedStatus updates game status to ended
Click to show internal directories.
Click to hide internal directories.