domain

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Account.ProtoReflect.Descriptor instead.

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 (x *Account) GetAccountId() string

func (*Account) GetBalanceInCents

func (x *Account) GetBalanceInCents() int32

func (*Account) GetIsOpen

func (x *Account) GetIsOpen() bool

func (*Account) GetName

func (x *Account) GetName() string

func (*Account) InstanceDescription

func (a *Account) InstanceDescription() string

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) Reset

func (x *Account) Reset()

func (*Account) String

func (x *Account) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Transfer.ProtoReflect.Descriptor instead.

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 (x *Transfer) GetAmountInCents() int32

func (*Transfer) GetFromAccountId

func (x *Transfer) GetFromAccountId() string

func (*Transfer) GetIsComplete

func (x *Transfer) GetIsComplete() bool

func (*Transfer) GetToAccountId

func (x *Transfer) GetToAccountId() string

func (*Transfer) GetTransferId

func (x *Transfer) GetTransferId() string

func (*Transfer) InstanceDescription

func (t *Transfer) InstanceDescription() string

InstanceDescription returns a human-readable description of the aggregate instance.

func (*Transfer) IsInstanceComplete

func (t *Transfer) IsInstanceComplete() bool

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) Reset

func (x *Transfer) Reset()

func (*Transfer) String

func (x *Transfer) String() string

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL