Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database interface {
// Get the slice of prices id for all tokens stored in database
// Returns error if operation fails
GetTokensPriceID() ([]string, error)
// Store given IBC tokens details inside database
// Returns error if operation fails
SaveIBCToken(token types.IBCToken) error
// Store given tokens details inside database
// Returns error if operation fails
SaveTokens(token []types.ChainRegistryAsset) error
// Store latest tokens price in database
// Returns error if operation fails
SaveTokensPrices(prices []types.TokenPrice) error
// Close closes the connection to the database
Close()
}
type DatabaseBuilder ¶
type DatabaseBuilder func(ctx *DatabaseContext) (Database, error)
DatabaseBuilder represents a method that allows to build database
type DatabaseContext ¶
type DatabaseContext struct {
Cfg utils.DatabaseConfig
}
DatabaseContext contains the data used to build a Database instance
func NewDatabaseContext ¶
func NewDatabaseContext(cfg utils.DatabaseConfig) *DatabaseContext
NewDatabaseContext allows to build new DatabaseContext instance
Click to show internal directories.
Click to hide internal directories.