exchange rate data source supports requesting multi url

This commit is contained in:
MaysWind
2021-03-08 23:08:25 +08:00
parent 9c82c4fdb8
commit b8adfc66e2
4 changed files with 94 additions and 33 deletions
@@ -7,8 +7,8 @@ import (
// ExchangeRatesDataSource defines the structure of exchange rates data source
type ExchangeRatesDataSource interface {
// GetRequestUrl returns the data source url
GetRequestUrl() string
// GetRequestUrl returns the data source urls
GetRequestUrls() []string
// Parse returns the common response entity according to the data source raw response
Parse(c *core.Context, content []byte) (*models.LatestExchangeRateResponse, error)