Documentation
¶
Index ¶
- Variables
- type Account
- func (*Account) Descriptor() ([]byte, []int)deprecated
- func (a *Account) DoCreditAccount(m *messages.CreditAccount, rec ax.EventRecorder)
- func (a *Account) DoDebitAccount(m *messages.DebitAccount, rec ax.EventRecorder)
- func (a *Account) DoOpenAccount(m *messages.OpenAccount, mctx ax.MessageContext, rec ax.EventRecorder)
- func (x *Account) GetAccountId() string
- func (x *Account) GetBalanceInCents() int32
- func (x *Account) GetIsOpen() bool
- func (x *Account) GetName() string
- func (a *Account) InstanceDescription() string
- func (*Account) ProtoMessage()
- func (x *Account) ProtoReflect() protoreflect.Message
- func (x *Account) Reset()
- func (x *Account) String() string
- func (a *Account) WhenAccountCredited(m *messages.AccountCredited)
- func (a *Account) WhenAccountDebited(m *messages.AccountDebited)
- func (a *Account) WhenAccountOpened(m *messages.AccountOpened)
- type Transfer
- func (*Transfer) Descriptor() ([]byte, []int)deprecated
- func (t *Transfer) DoMarkComplete(m *messages.MarkTransferComplete, mctx ax.MessageContext, rec ax.EventRecorder)
- func (t *Transfer) DoTransfer(m *messages.StartTransfer, mctx ax.MessageContext, rec ax.EventRecorder)
- func (x *Transfer) GetAmountInCents() int32
- func (x *Transfer) GetFromAccountId() string
- func (x *Transfer) GetIsComplete() bool
- func (x *Transfer) GetToAccountId() string
- func (x *Transfer) GetTransferId() string
- func (t *Transfer) InstanceDescription() string
- func (t *Transfer) IsInstanceComplete() bool
- func (*Transfer) ProtoMessage()
- func (x *Transfer) ProtoReflect() protoreflect.Message
- func (x *Transfer) Reset()
- func (x *Transfer) String() string
- func (t *Transfer) WhenCompleted(m *messages.TransferCompleted)
- func (t *Transfer) WhenStarted(m *messages.TransferStarted)
Constants ¶
This section is empty.
Variables ¶
var File_github_com_jmalloc_ax_examples_banking_domain_data_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` IsOpen bool `protobuf:"varint,2,opt,name=is_open,json=isOpen,proto3" json:"is_open,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` BalanceInCents int32 `protobuf:"varint,4,opt,name=balance_in_cents,json=balanceInCents,proto3" json:"balance_in_cents,omitempty"` // contains filtered or unexported fields }
Account contains data for the account aggregate.
func (*Account) Descriptor
deprecated
func (*Account) DoCreditAccount ¶
func (a *Account) DoCreditAccount(m *messages.CreditAccount, rec ax.EventRecorder)
DoCreditAccount credits funds to the account.
func (*Account) DoDebitAccount ¶
func (a *Account) DoDebitAccount(m *messages.DebitAccount, rec ax.EventRecorder)
DoDebitAccount debits funds from the account.
func (*Account) DoOpenAccount ¶
func (a *Account) DoOpenAccount(m *messages.OpenAccount, mctx ax.MessageContext, rec ax.EventRecorder)
DoOpenAccount opens a new account.
func (*Account) GetAccountId ¶
func (*Account) GetBalanceInCents ¶
func (*Account) InstanceDescription ¶
InstanceDescription returns a human-readable description of the aggregate instance.
func (*Account) ProtoMessage ¶
func (*Account) ProtoMessage()
func (*Account) ProtoReflect ¶ added in v0.4.2
func (x *Account) ProtoReflect() protoreflect.Message
func (*Account) WhenAccountCredited ¶
func (a *Account) WhenAccountCredited(m *messages.AccountCredited)
WhenAccountCredited updates the account to reflect the occurance of m.
func (*Account) WhenAccountDebited ¶
func (a *Account) WhenAccountDebited(m *messages.AccountDebited)
WhenAccountDebited updates the account to reflect the occurance of m.
func (*Account) WhenAccountOpened ¶
func (a *Account) WhenAccountOpened(m *messages.AccountOpened)
WhenAccountOpened updates the account to reflect the occurance of m.
type Transfer ¶
type Transfer struct { TransferId string `protobuf:"bytes,1,opt,name=transfer_id,json=transferId,proto3" json:"transfer_id,omitempty"` FromAccountId string `protobuf:"bytes,2,opt,name=from_account_id,json=fromAccountId,proto3" json:"from_account_id,omitempty"` ToAccountId string `protobuf:"bytes,3,opt,name=to_account_id,json=toAccountId,proto3" json:"to_account_id,omitempty"` AmountInCents int32 `protobuf:"varint,4,opt,name=amount_in_cents,json=amountInCents,proto3" json:"amount_in_cents,omitempty"` IsComplete bool `protobuf:"varint,5,opt,name=is_complete,json=isComplete,proto3" json:"is_complete,omitempty"` // contains filtered or unexported fields }
Transfer contains data for the transfer aggregate.
func (*Transfer) Descriptor
deprecated
func (*Transfer) DoMarkComplete ¶
func (t *Transfer) DoMarkComplete(m *messages.MarkTransferComplete, mctx ax.MessageContext, rec ax.EventRecorder)
DoMarkComplete marks the transfer as completed.
func (*Transfer) DoTransfer ¶
func (t *Transfer) DoTransfer(m *messages.StartTransfer, mctx ax.MessageContext, rec ax.EventRecorder)
DoTransfer begins a new funds transfer between two accounts.
func (*Transfer) GetAmountInCents ¶
func (*Transfer) GetFromAccountId ¶
func (*Transfer) GetIsComplete ¶
func (*Transfer) GetToAccountId ¶
func (*Transfer) GetTransferId ¶
func (*Transfer) InstanceDescription ¶
InstanceDescription returns a human-readable description of the aggregate instance.
func (*Transfer) IsInstanceComplete ¶
IsInstanceComplete returns true if the transfer has completed processing.
func (*Transfer) ProtoMessage ¶
func (*Transfer) ProtoMessage()
func (*Transfer) ProtoReflect ¶ added in v0.4.2
func (x *Transfer) ProtoReflect() protoreflect.Message
func (*Transfer) WhenCompleted ¶
func (t *Transfer) WhenCompleted(m *messages.TransferCompleted)
WhenCompleted updates the transfer to reflect the occurance of m.
func (*Transfer) WhenStarted ¶
func (t *Transfer) WhenStarted(m *messages.TransferStarted)
WhenStarted updates the transfer to reflect the occurance of m.