Documentation
¶
Index ¶
- Variables
- type Account
- func (a Account) Create(ctx context.Context, input account.CreateAccountInput) (entities.Account, error)
- func (a Account) GetAccounts(ctx context.Context) ([]entities.Account, error)
- func (a Account) GetBalance(ctx context.Context, id string) (int, error)
- func (a Account) GetByCpf(ctx context.Context, cpf string) (entities.Account, error)
- func (a Account) GetById(ctx context.Context, id string) (entities.Account, error)
- func (a Account) UpdateBalance(ctx context.Context, originAccountId, destinationAccountId string, amount int) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrAlreadyExist = errors.New("account already exist")
)
View Source
var ErrInvalidId = errors.New("id format is invalid")
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
// contains filtered or unexported fields
}
func NewAccountUseCase ¶
func NewAccountUseCase(repository account.Repository, logger zerolog.Logger) Account
func (Account) GetAccounts ¶
func (Account) GetBalance ¶
Click to show internal directories.
Click to hide internal directories.