Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrCurrencyNotFound = errors.New("can't convert currencies, currency not found")
)
Functions ¶
This section is empty.
Types ¶
type MockRateService ¶
MockRateService is an autogenerated mock type for the RateService type
func (*MockRateService) ConvertCurrency ¶
func (_m *MockRateService) ConvertCurrency(ctx context.Context, source string, target string) (decimal.Decimal, error)
ConvertCurrency provides a mock function with given fields: ctx, source, target
func (*MockRateService) GetAssetCurrency ¶
func (_m *MockRateService) GetAssetCurrency(assetId string) (string, error)
GetAssetCurrency provides a mock function with given fields: assetId
func (*MockRateService) IsFiatSymbolSupported ¶
func (_m *MockRateService) IsFiatSymbolSupported(symbol string) (bool, error)
IsFiatSymbolSupported provides a mock function with given fields: symbol
type RateService ¶
type RateService interface { // ConvertCurrency converts 1 unit of source currency to target currency //e.g. ConvertCurrency("EUR", "USD") would convert 1 EUR to USD (1.12 USD) ConvertCurrency(ctx context.Context, source, target string) (decimal.Decimal, error) // IsFiatSymbolSupported checks if fiat symbol is supported by the rate provider IsFiatSymbolSupported(symbol string) (bool, error) // GetAssetCurrency returns the currency of the asset GetAssetCurrency(assetId string) (string, error) }
Click to show internal directories.
Click to hide internal directories.