-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: currencies exchange rates cache (#22)
- Loading branch information
1 parent
4c7d4eb
commit b630d4d
Showing
46 changed files
with
1,084 additions
and
1,042 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 7 additions & 5 deletions
12
application/repositories/currencies_repository.go
100755 → 100644
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
package repositories | ||
|
||
import "convercy/domain/aggregate" | ||
import "convercy/domain/valueobject" | ||
|
||
//go:generate mockery --name RegisteredCurrenciesRepository | ||
type RegisteredCurrenciesRepository interface { | ||
GetRegisteredCurrencies() (*aggregate.RegisteredCurrencies, error) | ||
SaveRegisteredCurrencies(registeredCurrencies *aggregate.RegisteredCurrencies) error | ||
// CurrenciesRepository is a service responsible for providing all known currencies | ||
// | ||
//go:generate mockery --name CurrenciesRepository | ||
type CurrenciesRepository interface { | ||
// ListCurrencyCodes should return a list with all known currency codes | ||
ListCurrencyCodes() (valueobject.CurrencyCodes, error) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package repositories | ||
|
||
import ( | ||
"convercy/domain/aggregate" | ||
"convercy/domain/valueobject" | ||
) | ||
|
||
//go:generate mockery --name CurrencyExchangeRatesCache | ||
type CurrencyExchangeRatesCache interface { | ||
GetCurrencyExchangeRates(code valueobject.CurrencyCode) (*aggregate.CurrencyExchangeRates, error) | ||
SaveCurrencyExchangeRates(currencyExchangeRates *aggregate.CurrencyExchangeRates) error | ||
} |
11 changes: 11 additions & 0 deletions
11
application/repositories/currency_exchange_rates_repository.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package repositories | ||
|
||
import ( | ||
"convercy/domain/aggregate" | ||
"convercy/domain/valueobject" | ||
) | ||
|
||
//go:generate mockery --name CurrencyExchangeRatesRepository | ||
type CurrencyExchangeRatesRepository interface { | ||
GetCurrencyExchangeRates(code valueobject.CurrencyCode) (*aggregate.CurrencyExchangeRates, error) | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
71 changes: 71 additions & 0 deletions
71
application/repositories/mocks/CurrencyExchangeRatesCache.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
57 changes: 57 additions & 0 deletions
57
application/repositories/mocks/CurrencyExchangeRatesRepository.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package repositories | ||
|
||
import "convercy/domain/aggregate" | ||
|
||
//go:generate mockery --name RegisteredCurrenciesRepository | ||
type RegisteredCurrenciesRepository interface { | ||
GetRegisteredCurrencies() (*aggregate.RegisteredCurrencies, error) | ||
SaveRegisteredCurrencies(registeredCurrencies *aggregate.RegisteredCurrencies) error | ||
} |
Oops, something went wrong.