Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultOffset = 0 DefaultLimit = 100 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { ID uuid.UUID `sql:"id,pk,type:uuid default gen_random_uuid()" json:"id"` CurrencyNumericCode int `json:"currency_numeric_code"` Balance decimal.Decimal `json:"balance"` }
Account - information about account
type Currency ¶
type Currency struct { NumericCode int `sql:"numeric_code,pk" json:"numeric_code"` AlphaCode string `json:"alpha_code"` Minor int32 `json:"minor"` // Number of decimal units }
Currency - basic info about currency
type ExchangeRate ¶
type ExchangeRate struct { ID uuid.UUID `sql:"id,pk,type:uuid default gen_random_uuid()" json:"id"` CurrencyNumericCodeFrom int `json:"currency_numeric_code_from"` CurrencyNumericCodeTo int `json:"currency_numeric_code_to"` Rate decimal.Decimal `json:"rate"` }
ExchangeRate - information about exchange rates between two currencies
type ExchangeRateArgs ¶
type OffsetLimit ¶
OffsetLimit - used for database access
type Payment ¶
type Payment struct { ID uuid.UUID `sql:"id,pk,type:uuid default gen_random_uuid()" json:"id"` FromAccount uuid.UUID `json:"from_account"` ToAccount uuid.UUID `json:"to_account"` CurrencyNumericCode int `json:"currency_numeric_code"` Amount decimal.Decimal `json:"amount"` CreatedAt time.Time `json:"created_at"` }
Click to show internal directories.
Click to hide internal directories.