Documentation ¶
Index ¶
- func GenerateAccountId(userId string, currency string) string
- func GenerateFillId(venueOrderId string, fillId string) string
- func GenerateTransactionId(venueOrderId string) string
- type Account
- type AccountBalance
- type Entry
- type Hold
- type QldbAccount
- type QldbCoreAccount
- type QldbFill
- type QldbHold
- type QldbTransaction
- type Transaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateAccountId ¶
func GenerateFillId ¶
func GenerateTransactionId ¶
Types ¶
type AccountBalance ¶
type Entry ¶
type QldbAccount ¶
type QldbAccount struct { Id string `ion:"id"` Currency string `ion:"currency"` UserId string `ion:"userId"` Balance *ion.Decimal `ion:"balance"` Hold *ion.Decimal `ion:"hold"` Available *ion.Decimal `ion:"available"` UpdatedAt time.Time `ion:"updatedAt"` AccountUUID string `ion:"accountUUID"` }
func (*QldbAccount) ConvertToPostgresAccount ¶
func (q *QldbAccount) ConvertToPostgresAccount() (*Account, error)
func (*QldbAccount) Equal ¶
func (q *QldbAccount) Equal(i *api.AccountAndBalance) bool
func (*QldbAccount) GetCoreAccount ¶
func (q *QldbAccount) GetCoreAccount() *QldbCoreAccount
type QldbCoreAccount ¶
type QldbCoreAccount struct { Id string `ion:"id"` Currency string `ion:"currency"` UserId string `ion:"userId"` AccountUUID string `ion:"accountUUID"` }
func (*QldbCoreAccount) ConvertToPostgresAccount ¶
func (q *QldbCoreAccount) ConvertToPostgresAccount() (*Account, error)
type QldbFill ¶
type QldbFill struct { Id string `ion:"id"` ProductId string `ion:"productId"` Side string `ion:"side"` VenueOrderId string `ion:"venueOrderId"` FillId string `ion:"fillId"` Sender *QldbCoreAccount `ion:"sender"` Receiver *QldbCoreAccount `ion:"receiver"` FilledQuantity *ion.Decimal `ion:"filledQuantity"` FilledValue *ion.Decimal `ion:"filledValue"` VenueFee *ion.Decimal `ion:"venueFee"` RetailFee *ion.Decimal `ion:"retailFee"` CreatedAt time.Time `ion:"createdAt"` Metadata map[string]string `ion:"metadata"` }
type QldbTransaction ¶
type QldbTransaction struct { Id string `ion:"id"` VenueOrderId string `ion:"venueOrderId"` Sender *QldbCoreAccount `ion:"sender"` Receiver *QldbCoreAccount `ion:"receiver"` CreatedAt time.Time `ion:"createdAt"` UpdatedAt time.Time `ion:"updatedAt"` Status string `ion:"status"` TransactionType string `ion:"transactionType"` Hold *QldbHold `ion:"hold"` ProductId string `ion:"productId"` }
func (*QldbTransaction) ConvertToPostgresTransaction ¶
func (q *QldbTransaction) ConvertToPostgresTransaction() (*Transaction, error)
type Transaction ¶
type Transaction struct { Id uuid.UUID `db:"id"` QldbId string `db:"qldb_id"` Sender uuid.UUID `db:"sender_id"` Receiver uuid.UUID `db:"receiver_id"` CreatedAt time.Time `db:"created_at"` FinalizedAt time.Time `db:"finalized_at"` TransactionStatus string `db:"transaction_status"` TransactionType string `db:"transaction_type"` ProductId string `db:"product_id"` }
Click to show internal directories.
Click to hide internal directories.