Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientExposure ¶
type ClientExposure struct {
ClientId int64
Exposure *MonetaryAmount
}
type ClientExposureDetailStorage ¶
type ClientExposureDetailStorage interface {
FindByClientIdAndExposureCurrency(ctx context.Context, clientId int64, exposureCurrency string) (*ClientExposure, error)
FindAllByClientId(ctx context.Context, clientId int64) ([]*ClientExposure, error)
FindAll(ctx context.Context) ([]*ClientExposure, error)
Save(ctx context.Context, detail *ClientExposure) error
}
type ClientExposureStorage ¶
type ClientExposureStorage interface {
Save(ctx context.Context, totalExposure *ClientExposure) error
FindByClientId(ctx context.Context, clientId int64) (*ClientExposure, error)
}
type CurrencyRate ¶
type CurrencyRateMessage ¶
type CurrencyRateMessage []CurrencyRate
type CurrencyRateService ¶
type CurrencyRateService interface {
ReceiveRate(rate *CurrencyRate) error
}
type CurrencyRateStorage ¶
type CurrencyRateStorage interface {
SaveRate(ctx context.Context, rate *CurrencyRate) error
FindByBaseCurrencyAndQuotedCurrency(ctx context.Context, baseCurrency, quotedCurrency string) (*CurrencyRate, error)
FindAll(ctx context.Context) ([]*CurrencyRate, error)
}
type Deal ¶
type Deal struct {
Id int64 `json:"id"`
ClientId int64 `json:"clientId"`
AmountBought MonetaryAmount `json:"amountBought"`
AmountSold MonetaryAmount `json:"amountSold"`
}
type DealService ¶
type DealStorage ¶
type MonetaryAmount ¶
func (*MonetaryAmount) Negate ¶
func (m *MonetaryAmount) Negate() MonetaryAmount
func (*MonetaryAmount) String ¶
func (m *MonetaryAmount) String() string
type TotalExposure ¶
type TotalExposure struct {
ClientId int64 `json:"clientId"`
Total MonetaryAmount `json:"total"`
Amounts []MonetaryAmount `json:"amounts"`
}
type TotalExposureService ¶
type TotalExposureService interface {
RecalculateAllTotalExposure() error
GetClientsTotalExposure(clientId int64) (*TotalExposure, error)
ConsiderNewAmounts(clientId int64, monetaryAmounts ...MonetaryAmount) error
}
Click to show internal directories.
Click to hide internal directories.