Documentation ¶
Index ¶
Constants ¶
View Source
const ( // EventPromise represents promise prefix EventPromise = "0" // EventCommit represents commit prefix EventCommit = "1" // EventRollback represents rollback prefix EventRollback = "2" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { AccountName string `json:"accountNumber"` Currency string `json:"currency"` IsBalanceCheck bool `json:"isBalanceCheck"` Balance *money.Dec Promised *money.Dec PromiseBuffer TransactionSet Version int }
Account represents metadata of account entity
func (*Account) Deserialise ¶
Hydrate deserializes Account entity from persistent data
type Committed ¶
type Committed struct {
IDTransaction string
}
Committed is reply message that transaction is committed
type CreateAccount ¶
CreateAccount is inbound request for creation of new account
type GetAccountState ¶
type GetAccountState struct { }
GetAccountState is inbound request for balance of account
type Rollbacked ¶
type Rollbacked struct {
IDTransaction string
}
Rollbacked is reply message that transaction is rollbacked
type TransactionSet ¶
type TransactionSet struct {
// contains filtered or unexported fields
}
TransactionSet is set datastructure for transaction Ids
func NewTransactionSet ¶
func NewTransactionSet() TransactionSet
NewTransactionSet returns empty set
func (*TransactionSet) Add ¶
func (s *TransactionSet) Add(items ...string)
Add adds items to set if not already present
func (*TransactionSet) Contains ¶
func (s *TransactionSet) Contains(items ...string) bool
Contains returns true if all items are present in set
func (*TransactionSet) Remove ¶
func (s *TransactionSet) Remove(items ...string)
Remove removes items from set
func (*TransactionSet) Size ¶
func (s *TransactionSet) Size() int
Size returns number of items in set
func (*TransactionSet) String ¶
func (s *TransactionSet) String() string
func (*TransactionSet) Values ¶
func (s *TransactionSet) Values() []string
Values returns slice of items in order or insertion
Click to show internal directories.
Click to hide internal directories.