Documentation
¶
Index ¶
- type AccountOutput
- type CreateAccountInput
- type CreateAccountOutput
- type CreateAccountUseCase
- type CreateCustomerInput
- type CreateCustomerOutput
- type CreateCustomerUseCase
- type CreateTransactionInput
- type CreateTransactionOutput
- type CreateTransactionUseCase
- type CustomerOutput
- type DeleteCustomerInput
- type DeleteCustomerOutput
- type DeleteCustomerUseCase
- type DepositInput
- type DepositOutput
- type DepositUseCase
- type FindCustomerInput
- type FindCustomerOutput
- type FindCustomerUseCase
- type ListCustomerAccountsInput
- type ListCustomerAccountsOutput
- type ListCustomerAccountsUseCase
- type ListCustomersInput
- type ListCustomersOutput
- type ListCustomersUseCase
- type MockCustomerGateway
- func (m *MockCustomerGateway) Create(customer *entity.Customer) error
- func (m *MockCustomerGateway) Delete(customer *entity.Customer) error
- func (m *MockCustomerGateway) FindAll() ([]*entity.Customer, error)
- func (m *MockCustomerGateway) FindById(id string) (*entity.Customer, error)
- func (m *MockCustomerGateway) Update(customer *entity.Customer) error
- type ShowAccountBalanceInput
- type ShowAccountBalanceOutput
- type ShowAccountBalanceUseCase
- type UpdateCustomerInput
- type UpdateCustomerOutput
- type UpdateCustomerUseCase
- type WithdrawInput
- type WithdrawOutput
- type WithdrawUseCase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountOutput ¶
type CreateAccountInput ¶
type CreateAccountInput struct {
CustomerId string
}
type CreateAccountOutput ¶
type CreateAccountUseCase ¶
type CreateAccountUseCase struct {
// contains filtered or unexported fields
}
func NewCreateAccountUseCase ¶
func NewCreateAccountUseCase(accountGateway gateway.AccountGateway, customerGateway gateway.CustomerGateway) *CreateAccountUseCase
func (*CreateAccountUseCase) Execute ¶
func (uc *CreateAccountUseCase) Execute(input CreateAccountInput) (*CreateAccountOutput, error)
type CreateCustomerInput ¶
type CreateCustomerOutput ¶
type CreateCustomerUseCase ¶
type CreateCustomerUseCase struct {
// contains filtered or unexported fields
}
func NewCreateCustomerUseCase ¶
func NewCreateCustomerUseCase(customerGateway gateway.CustomerGateway) *CreateCustomerUseCase
func (*CreateCustomerUseCase) Execute ¶
func (uc *CreateCustomerUseCase) Execute(input *CreateCustomerInput) (*CreateCustomerOutput, error)
type CreateTransactionInput ¶
type CreateTransactionOutput ¶
type CreateTransactionOutput struct { From AccountOutput `json:"from"` To AccountOutput `json:"to"` Amount float64 `json:"amount"` }
type CreateTransactionUseCase ¶
type CreateTransactionUseCase struct {
// contains filtered or unexported fields
}
func NewCreateTransactionUseCase ¶
func NewCreateTransactionUseCase( transactionGateway gateway.TransactionGateway, accountGateway gateway.AccountGateway, eventDispatcher *events.EventDispatcher, ) *CreateTransactionUseCase
func (*CreateTransactionUseCase) Execute ¶
func (uc *CreateTransactionUseCase) Execute(input *CreateTransactionInput) (*CreateTransactionOutput, error)
type CustomerOutput ¶
type DeleteCustomerInput ¶
type DeleteCustomerInput struct {
Id string
}
type DeleteCustomerOutput ¶
type DeleteCustomerUseCase ¶
type DeleteCustomerUseCase struct {
// contains filtered or unexported fields
}
func NewDeleteCustomerUseCase ¶
func NewDeleteCustomerUseCase(customerGateway gateway.CustomerGateway) *DeleteCustomerUseCase
func (*DeleteCustomerUseCase) Execute ¶
func (uc *DeleteCustomerUseCase) Execute(input *DeleteCustomerInput) (*DeleteCustomerOutput, error)
type DepositInput ¶
type DepositOutput ¶
type DepositUseCase ¶
type DepositUseCase struct {
// contains filtered or unexported fields
}
func NewDepositUseCase ¶
func NewDepositUseCase(accountGateway gateway.AccountGateway) *DepositUseCase
func (*DepositUseCase) Execute ¶
func (uc *DepositUseCase) Execute(input *DepositInput) (*DepositOutput, error)
type FindCustomerInput ¶
type FindCustomerInput struct {
Id string
}
type FindCustomerOutput ¶
type FindCustomerUseCase ¶
type FindCustomerUseCase struct {
// contains filtered or unexported fields
}
func NewFindCustomerUseCase ¶
func NewFindCustomerUseCase(customerGateway gateway.CustomerGateway) *FindCustomerUseCase
func (*FindCustomerUseCase) Execute ¶
func (uc *FindCustomerUseCase) Execute(input *FindCustomerInput) (*FindCustomerOutput, error)
type ListCustomerAccountsInput ¶
type ListCustomerAccountsInput struct {
CustomerId string
}
type ListCustomerAccountsOutput ¶
type ListCustomerAccountsOutput struct {
Accounts []*AccountOutput `json:"accounts"`
}
type ListCustomerAccountsUseCase ¶
type ListCustomerAccountsUseCase struct {
// contains filtered or unexported fields
}
func NewListCustomerAccountsUseCase ¶
func NewListCustomerAccountsUseCase(accountGateway gateway.AccountGateway, customerGateway gateway.CustomerGateway) *ListCustomerAccountsUseCase
func (*ListCustomerAccountsUseCase) Execute ¶
func (uc *ListCustomerAccountsUseCase) Execute(input ListCustomerAccountsInput) (*ListCustomerAccountsOutput, error)
type ListCustomersInput ¶
type ListCustomersInput struct{}
type ListCustomersOutput ¶
type ListCustomersOutput struct {
Customers []*CustomerOutput `json:"customers"`
}
type ListCustomersUseCase ¶
type ListCustomersUseCase struct {
// contains filtered or unexported fields
}
func NewListCustomersUseCase ¶
func NewListCustomersUseCase(customerGateway gateway.CustomerGateway) *ListCustomersUseCase
func (*ListCustomersUseCase) Execute ¶
func (uc *ListCustomersUseCase) Execute(input *ListCustomersInput) (*ListCustomersOutput, error)
type MockCustomerGateway ¶
func (*MockCustomerGateway) Create ¶
func (m *MockCustomerGateway) Create(customer *entity.Customer) error
func (*MockCustomerGateway) Delete ¶
func (m *MockCustomerGateway) Delete(customer *entity.Customer) error
func (*MockCustomerGateway) FindAll ¶
func (m *MockCustomerGateway) FindAll() ([]*entity.Customer, error)
type ShowAccountBalanceInput ¶
type ShowAccountBalanceInput struct {
Id string
}
type ShowAccountBalanceUseCase ¶
type ShowAccountBalanceUseCase struct {
// contains filtered or unexported fields
}
func NewShowAccountBalanceUseCase ¶
func NewShowAccountBalanceUseCase(accountGateway gateway.AccountGateway) *ShowAccountBalanceUseCase
func (*ShowAccountBalanceUseCase) Execute ¶
func (uc *ShowAccountBalanceUseCase) Execute(input *ShowAccountBalanceInput) (*ShowAccountBalanceOutput, error)
type UpdateCustomerInput ¶
type UpdateCustomerOutput ¶
type UpdateCustomerUseCase ¶
type UpdateCustomerUseCase struct {
// contains filtered or unexported fields
}
func NewUpdateCustomerUseCase ¶
func NewUpdateCustomerUseCase(customerGateway gateway.CustomerGateway) *UpdateCustomerUseCase
func (*UpdateCustomerUseCase) Execute ¶
func (uc *UpdateCustomerUseCase) Execute(input *UpdateCustomerInput) (*UpdateCustomerOutput, error)
type WithdrawInput ¶
type WithdrawOutput ¶
type WithdrawUseCase ¶
type WithdrawUseCase struct {
// contains filtered or unexported fields
}
func NewWithdrawUseCase ¶
func NewWithdrawUseCase(accountGateway gateway.AccountGateway) *WithdrawUseCase
func (*WithdrawUseCase) Execute ¶
func (uc *WithdrawUseCase) Execute(input *WithdrawInput) (*WithdrawOutput, error)
Click to show internal directories.
Click to hide internal directories.