-
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.
- Loading branch information
1 parent
db9b42c
commit 3f7e018
Showing
5 changed files
with
127 additions
and
10 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
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,61 @@ | ||
package bank | ||
|
||
import ( | ||
"time" | ||
|
||
"github.com/google/uuid" | ||
) | ||
|
||
const FxCreatedEvent = "fx-created" | ||
const FxSettledEvent = "fx-settled" | ||
const FxFailedEvent = "fx-failed" | ||
|
||
type FxCreated struct { | ||
ID uuid.UUID | ||
Provider string | ||
|
||
BuyCurrency string | ||
BuyAmount float64 | ||
SellCurrency string | ||
SellAmount float64 | ||
MarginCurrency string | ||
MarginAmount float64 | ||
|
||
Rate float64 | ||
|
||
SellAccountIdentifier string | ||
BuyAccountIdentifier string | ||
MarginAccountIdentifier string | ||
|
||
ExternalIdentifier string | ||
Timestamp time.Time | ||
} | ||
|
||
type FxSettled struct { | ||
ID uuid.UUID | ||
Provider string | ||
|
||
BuyCurrency string | ||
BuyAmount float64 | ||
SellCurrency string | ||
SellAmount float64 | ||
MarginCurrency string | ||
MarginAmount float64 | ||
|
||
Rate float64 | ||
|
||
SellAccountIdentifier string | ||
BuyAccountIdentifier string | ||
MarginAccountIdentifier string | ||
|
||
ExternalIdentifier string | ||
Timestamp time.Time | ||
} | ||
|
||
type FxFailed struct { | ||
ID uuid.UUID | ||
Provider string | ||
Reason string | ||
ExternalIdentifier string | ||
Timestamp time.Time | ||
} |
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,47 @@ | ||
package bank | ||
|
||
import ( | ||
"time" | ||
|
||
"github.com/google/uuid" | ||
) | ||
|
||
const TransactionCreatedEvent = "transaction-created" | ||
const TransactionSettledEvent = "transaction-settled" | ||
const TransactionFailedEvent = "transaction-failed" | ||
|
||
type TransactionCreated struct { | ||
ID uuid.UUID | ||
Provider string | ||
Currency string | ||
Amount float64 | ||
AccountIdentifier string | ||
AccountOwner string | ||
OppositeAccountIdentifier string | ||
OppositeAccountOwner string | ||
Reference string | ||
ExternalIdentifier string | ||
Timestamp time.Time | ||
} | ||
|
||
type TransactionSettled struct { | ||
ID uuid.UUID | ||
Provider string | ||
Currency string | ||
Amount float64 | ||
AccountIdentifier string | ||
AccountOwner string | ||
OppositeAccountIdentifier string | ||
OppositeAccountOwner string | ||
Reference string | ||
ExternalIdentifier string | ||
Timestamp time.Time | ||
} | ||
|
||
type TransactionFailed struct { | ||
ID uuid.UUID | ||
Provider string | ||
Reason string | ||
ExternalIdentifier string | ||
Timestamp time.Time | ||
} |
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,6 +1,8 @@ | ||
package events | ||
|
||
const ( | ||
BankingAuthEvents = "banking-events-auth" | ||
BankingAccountEvents = "banking-events-accounts" | ||
BankingTransactionEvents = "banking-events-transactions" | ||
BankingFxEvents = "banking-events-fx" | ||
) |