Documentation ¶
Index ¶
- type CreateAccountInput
- type CreateAccountOutput
- type CreateAccountPresenter
- type CreateAccountUseCase
- type CreateTransferInput
- type CreateTransferOutput
- type CreateTransferPresenter
- type CreateTransferUseCase
- type FindAccountBalaceInput
- type FindAccountBalanceOutput
- type FindAccountBalancePresenter
- type FindAccountBalanceUseCase
- type FindAllAccountOutput
- type FindAllAccountPresenter
- type FindAllAccountUseCase
- type FindAllTransferOutput
- type FindAllTransferPresenter
- type FindAllTransferUseCase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateAccountInput ¶
type CreateAccountInput struct { Name string `json:"name" validate:"required"` CPF string `json:"cpf" validate:"required"` Balance int64 `json:"balance" validate:"gt=0,required"` }
CreateAccountInput input data
type CreateAccountOutput ¶
type CreateAccountOutput struct { ID string `json:"id"` Name string `json:"name"` CPF string `json:"cpf"` Balance float64 `json:"balance"` CreatedAt string `json:"created_at"` }
CreateAccountOutput output data
type CreateAccountPresenter ¶
type CreateAccountPresenter interface {
Output(domain.Account) CreateAccountOutput
}
CreateAccountPresenter output port
type CreateAccountUseCase ¶
type CreateAccountUseCase interface {
Execute(context.Context, CreateAccountInput) (CreateAccountOutput, error)
}
CreateAccountUseCase input port
func NewCreateAccountInteractor ¶
func NewCreateAccountInteractor( repo domain.AccountRepository, presenter CreateAccountPresenter, t time.Duration, ) CreateAccountUseCase
NewCreateAccountInteractor creates new createAccountInteractor with its dependencies
type CreateTransferInput ¶
type CreateTransferInput struct { AccountOriginID string `json:"account_origin_id" validate:"required,uuid4"` AccountDestinationID string `json:"account_destination_id" validate:"required,uuid4"` Amount int64 `json:"amount" validate:"gt=0,required"` }
CreateTransferInput input data
type CreateTransferOutput ¶
type CreateTransferOutput struct { ID string `json:"id"` AccountOriginID string `json:"account_origin_id"` AccountDestinationID string `json:"account_destination_id"` Amount float64 `json:"amount"` CreatedAt string `json:"created_at"` }
CreateTransferOutput output data
type CreateTransferPresenter ¶
type CreateTransferPresenter interface {
Output(domain.Transfer) CreateTransferOutput
}
CreateTransferPresenter output port
type CreateTransferUseCase ¶
type CreateTransferUseCase interface {
Execute(context.Context, CreateTransferInput) (CreateTransferOutput, error)
}
CreateTransferUseCase input port
func NewCreateTransferInteractor ¶
func NewCreateTransferInteractor( transferRepo domain.TransferRepository, accountRepo domain.AccountRepository, presenter CreateTransferPresenter, t time.Duration, ) CreateTransferUseCase
NewCreateTransferInteractor creates new createTransferInteractor with its dependencies
type FindAccountBalaceInput ¶
type FindAccountBalaceInput struct {
ID int64 `json:"balance" validate:"gt=0,required"`
}
FindAccountBalaceInput input data
type FindAccountBalanceOutput ¶
type FindAccountBalanceOutput struct {
Balance float64 `json:"balance"`
}
FindAccountBalanceOutput output data
type FindAccountBalancePresenter ¶
type FindAccountBalancePresenter interface {
Output(domain.Money) FindAccountBalanceOutput
}
FindAccountBalancePresenter output port
type FindAccountBalanceUseCase ¶
type FindAccountBalanceUseCase interface {
Execute(context.Context, domain.AccountID) (FindAccountBalanceOutput, error)
}
FindAccountBalanceUseCase input port
func NewFindBalanceAccountInteractor ¶
func NewFindBalanceAccountInteractor( repo domain.AccountRepository, presenter FindAccountBalancePresenter, t time.Duration, ) FindAccountBalanceUseCase
NewFindBalanceAccountInteractor creates new findBalanceAccountInteractor with its dependencies
type FindAllAccountOutput ¶
type FindAllAccountOutput struct { ID string `json:"id"` Name string `json:"name"` CPF string `json:"cpf"` Balance float64 `json:"balance"` CreatedAt string `json:"created_at"` }
FindAllAccountOutput outputData
type FindAllAccountPresenter ¶
type FindAllAccountPresenter interface {
Output([]domain.Account) []FindAllAccountOutput
}
FindAllAccountPresenter output port
type FindAllAccountUseCase ¶
type FindAllAccountUseCase interface {
Execute(context.Context) ([]FindAllAccountOutput, error)
}
FindAllAccountUseCase input port
func NewFindAllAccountInteractor ¶
func NewFindAllAccountInteractor( repo domain.AccountRepository, presenter FindAllAccountPresenter, t time.Duration, ) FindAllAccountUseCase
NewFindAllAccountInteractor creates new findAllAccountInteractor with its dependencies
type FindAllTransferOutput ¶
type FindAllTransferOutput struct { ID string `json:"id"` AccountOriginID string `json:"account_origin_id"` AccountDestinationID string `json:"account_destination_id"` Amount float64 `json:"amount"` CreatedAt string `json:"created_at"` }
FindAllTransferOutput output data
type FindAllTransferPresenter ¶
type FindAllTransferPresenter interface {
Output([]domain.Transfer) []FindAllTransferOutput
}
FindAllTransferPresenter output port
type FindAllTransferUseCase ¶
type FindAllTransferUseCase interface {
Execute(context.Context) ([]FindAllTransferOutput, error)
}
FindAllTransferUseCase input port
func NewFindAllTransferInteractor ¶
func NewFindAllTransferInteractor( repo domain.TransferRepository, presenter FindAllTransferPresenter, t time.Duration, ) FindAllTransferUseCase
NewFindAllTransferInteractor creates new findAllTransferInteractor with its dependencies