Documentation
¶
Index ¶
- type BaseAmountSvc
- type Converter
- type DecimalService
- type Quote
- type RemoteRates
- type Service
- func (s *Service) CreateCurrency(ctx context.Context, req *currencyv1.CreateCurrencyRequest) (*currencyv1.CreateCurrencyResponse, error)
- func (s *Service) DeleteCurrency(ctx context.Context, req *currencyv1.DeleteCurrencyRequest) (*currencyv1.DeleteCurrencyResponse, error)
- func (s *Service) GetCurrencies(ctx context.Context, req *currencyv1.GetCurrenciesRequest) (*currencyv1.GetCurrenciesResponse, error)
- func (s *Service) UpdateCurrency(ctx context.Context, req *currencyv1.UpdateCurrencyRequest) (*currencyv1.UpdateCurrencyResponse, error)
- type Syncer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseAmountSvc ¶
type Converter ¶
type Converter struct {
// contains filtered or unexported fields
}
func NewConverter ¶
type DecimalService ¶
type DecimalService struct {
// contains filtered or unexported fields
}
func NewDecimalService ¶
func NewDecimalService() *DecimalService
func (*DecimalService) GetCurrencyDecimals ¶
func (s *DecimalService) GetCurrencyDecimals(ctx context.Context, currency string) int32
type RemoteRates ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(cfg configuration.CurrencyConfig) *Service
func (*Service) CreateCurrency ¶
func (s *Service) CreateCurrency( ctx context.Context, req *currencyv1.CreateCurrencyRequest, ) (*currencyv1.CreateCurrencyResponse, error)
func (*Service) DeleteCurrency ¶
func (s *Service) DeleteCurrency( ctx context.Context, req *currencyv1.DeleteCurrencyRequest, ) (*currencyv1.DeleteCurrencyResponse, error)
func (*Service) GetCurrencies ¶
func (s *Service) GetCurrencies( ctx context.Context, req *currencyv1.GetCurrenciesRequest, ) (*currencyv1.GetCurrenciesResponse, error)
func (*Service) UpdateCurrency ¶
func (s *Service) UpdateCurrency( ctx context.Context, req *currencyv1.UpdateCurrencyRequest, ) (*currencyv1.UpdateCurrencyResponse, error)
type Syncer ¶
type Syncer struct {
// contains filtered or unexported fields
}
func NewSyncer ¶
func NewSyncer( cl httpClient, baseAmountSvc BaseAmountSvc, config configuration.CurrencyConfig, ) *Syncer
func (*Syncer) RebaseRates ¶
func (s *Syncer) RebaseRates( _ context.Context, currentRates *RemoteRates, ) (*RemoteRates, error)
Click to show internal directories.
Click to hide internal directories.