Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound return when data not found ErrNotFound = errors.New("not found") )
Functions ¶
This section is empty.
Types ¶
type TokenPriceDB ¶
type TokenPriceDB struct {
// contains filtered or unexported fields
}
TokenPriceDB is storage of token price
func NewTokenPriceDB ¶
func NewTokenPriceDB(sugar *zap.SugaredLogger, db *sqlx.DB) (*TokenPriceDB, error)
NewTokenPriceDB return instance of TokenPriceDB
func (*TokenPriceDB) GetTokenPrice ¶
func (x *TokenPriceDB) GetTokenPrice(token, currency, provider string, timestamp time.Time) (float64, error)
GetTokenPrice save token price data
func (*TokenPriceDB) SaveTokenPrice ¶
func (x *TokenPriceDB) SaveTokenPrice(token, currency, provider string, timestamp time.Time, price float64) error
SaveTokenPrice save token price data
Click to show internal directories.
Click to hide internal directories.