Documentation ¶
Index ¶
Constants ¶
View Source
const ( // UpdateMethodTypeBitFinexV2 is the http API used by bitfinex V2 UpdateMethodTypeBitFinexV2 string = "bitfinexV2" // UpdateMethodTypeCoingeckoV3 is the http API used by copingecko V3 UpdateMethodTypeCoingeckoV3 string = "CoinGeckoV3" // UpdateMethodTypeIgnore indicates to not update the value, to set value 0 // it's better to use UpdateMethodTypeStatic UpdateMethodTypeIgnore string = "ignore" )
Variables ¶
This section is empty.
Functions ¶
func ProviderValidation ¶ added in v1.4.0
func ProviderValidation(sl validator.StructLevel)
ProviderValidation method is for validation of Provider struct
Types ¶
type PriceUpdater ¶
type PriceUpdater struct {
// contains filtered or unexported fields
}
PriceUpdater definition
func NewPriceUpdater ¶
func NewPriceUpdater( updateMethodTypesPriority string, providers []Provider, staticTokens string, fiat Fiat, db *historydb.HistoryDB, ) (*PriceUpdater, error)
NewPriceUpdater is the constructor for the updater
func (*PriceUpdater) UpdateFiatPrices ¶ added in v1.4.0
func (p *PriceUpdater) UpdateFiatPrices(ctx context.Context) error
UpdateFiatPrices updates the fiat prices
func (*PriceUpdater) UpdateFiatPricesMock ¶ added in v1.4.0
func (p *PriceUpdater) UpdateFiatPricesMock(ctx context.Context) error
UpdateFiatPricesMock updates the fiat prices
func (*PriceUpdater) UpdatePrices ¶
func (p *PriceUpdater) UpdatePrices(ctx context.Context)
UpdatePrices is triggered by the Coordinator, and internally will update the token prices in the db
func (*PriceUpdater) UpdateTokenList ¶
func (p *PriceUpdater) UpdateTokenList() error
UpdateTokenList get the registered token symbols from HistoryDB
Click to show internal directories.
Click to hide internal directories.