Documentation ¶
Index ¶
- type Fetcher
- type ReserveData
- func (self ReserveData) CurrentBalanceVersion(timepoint uint64) (common.Version, error)
- func (self ReserveData) CurrentEBalanceVersion(timepoint uint64) (common.Version, error)
- func (self ReserveData) CurrentPriceVersion(timepoint uint64) (common.Version, error)
- func (self ReserveData) CurrentRateVersion(timepoint uint64) (common.Version, error)
- func (self ReserveData) GetAllBalances(timepoint uint64) (common.AllBalanceResponse, error)
- func (self ReserveData) GetAllEBalances(timepoint uint64) (common.AllEBalanceResponse, error)
- func (self ReserveData) GetAllPrices(timepoint uint64) (common.AllPriceResponse, error)
- func (self ReserveData) GetAllRates(timepoint uint64) (common.AllRateResponse, error)
- func (self ReserveData) GetOnePrice(pairID common.TokenPairID, timepoint uint64) (common.OnePriceResponse, error)
- func (self ReserveData) GetPendingActivities() ([]common.ActivityRecord, error)
- func (self ReserveData) GetRecords() ([]common.ActivityRecord, error)
- func (self ReserveData) Run() error
- func (self ReserveData) Stop() error
- type Storage
- type TestFetcher
- type TestStorage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReserveData ¶
type ReserveData struct {
// contains filtered or unexported fields
}
func NewReserveData ¶
func NewReserveData(storage Storage, fetcher Fetcher) *ReserveData
func (ReserveData) CurrentBalanceVersion ¶
func (self ReserveData) CurrentBalanceVersion(timepoint uint64) (common.Version, error)
func (ReserveData) CurrentEBalanceVersion ¶
func (self ReserveData) CurrentEBalanceVersion(timepoint uint64) (common.Version, error)
func (ReserveData) CurrentPriceVersion ¶
func (self ReserveData) CurrentPriceVersion(timepoint uint64) (common.Version, error)
func (ReserveData) CurrentRateVersion ¶
func (self ReserveData) CurrentRateVersion(timepoint uint64) (common.Version, error)
func (ReserveData) GetAllBalances ¶
func (self ReserveData) GetAllBalances(timepoint uint64) (common.AllBalanceResponse, error)
func (ReserveData) GetAllEBalances ¶
func (self ReserveData) GetAllEBalances(timepoint uint64) (common.AllEBalanceResponse, error)
func (ReserveData) GetAllPrices ¶
func (self ReserveData) GetAllPrices(timepoint uint64) (common.AllPriceResponse, error)
func (ReserveData) GetAllRates ¶
func (self ReserveData) GetAllRates(timepoint uint64) (common.AllRateResponse, error)
func (ReserveData) GetOnePrice ¶
func (self ReserveData) GetOnePrice(pairID common.TokenPairID, timepoint uint64) (common.OnePriceResponse, error)
func (ReserveData) GetPendingActivities ¶
func (self ReserveData) GetPendingActivities() ([]common.ActivityRecord, error)
func (ReserveData) GetRecords ¶
func (self ReserveData) GetRecords() ([]common.ActivityRecord, error)
func (ReserveData) Run ¶
func (self ReserveData) Run() error
func (ReserveData) Stop ¶
func (self ReserveData) Stop() error
type Storage ¶
type Storage interface { CurrentPriceVersion(timepoint uint64) (common.Version, error) GetAllPrices(common.Version) (map[common.TokenPairID]common.OnePrice, error) GetOnePrice(common.TokenPairID, common.Version) (common.OnePrice, error) CurrentBalanceVersion(timepoint uint64) (common.Version, error) GetAllBalances(common.Version) (map[string]common.BalanceEntry, error) CurrentEBalanceVersion(timepoint uint64) (common.Version, error) GetAllEBalances(common.Version) (map[common.ExchangeID]common.EBalanceEntry, error) CurrentRateVersion(timepoint uint64) (common.Version, error) GetAllRates(common.Version) (common.AllRateEntry, error) GetAllRecords() ([]common.ActivityRecord, error) GetPendingActivities() ([]common.ActivityRecord, error) }
type TestFetcher ¶
type TestFetcher struct{}
func NewTestFetcher ¶
func NewTestFetcher() TestFetcher
type TestStorage ¶
type TestStorage struct{}
func NewTestStorage ¶
func NewTestStorage() TestStorage
func (TestStorage) CurrentPriceVersion ¶
func (self TestStorage) CurrentPriceVersion() (common.Version, error)
func (TestStorage) GetAllPrices ¶
func (self TestStorage) GetAllPrices(version common.Version) (map[common.TokenPairID]common.OnePrice, error)
func (TestStorage) GetOnePrice ¶
func (self TestStorage) GetOnePrice(pairID common.TokenPairID, version common.Version) (common.OnePrice, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.