Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewExchangeRateAPIProvider ¶
func NewExchangeRateAPIProvider( cfg *config.ExchangeRateApi, logger *slog.Logger, ) *exchangeRateAPI
NewExchangeRateAPIProvider creates a new ExchangeRate API provider using config
func NewFakeExchangeRate ¶
func NewFakeExchangeRate() *fakeExchangeRate
Types ¶
type ExchangeRateAPIResponseV6 ¶
type ExchangeRateAPIResponseV6 struct {
Result string `json:"result"`
Documentation string `json:"documentation"`
TermsOfUse string `json:"terms_of_use"`
TimeLastUpdateUnix int64 `json:"time_last_update_unix"`
TimeNextUpdateUnix int64 `json:"time_next_update_unix"`
TimeNextUpdateUTC string `json:"time_next_update_utc"`
BaseCode string `json:"base_code"`
ConversionRates map[string]float64 `json:"conversion_rates"`
// Error fields (if any)
ErrorType string `json:"error-type,omitempty"`
}
ExchangeRateAPIResponseV6 represents the v6 response from the ExchangeRate API See: https://www.exchangerate-api.com/docs/standard-requests Example: { "result": "success", "documentation": "...", "terms_of_use": "...", "time_last_update_unix": 1585267200, ... }
Click to show internal directories.
Click to hide internal directories.