Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrAccountNotFound happens when the account was not found based on search params. ErrAccountNotFound = errors.New("account not found") )
Functions ¶
This section is empty.
Types ¶
type AccountRepository ¶
type AccountRepository interface { Create(ctx context.Context, account *model.Account) error ExistsByCPF(ctx context.Context, cpf model.CPF) (bool, error) GetByCPF(ctx context.Context, cpf model.CPF) (*model.Account, error) Fetch(ctx context.Context) ([]model.Account, error) GetBalance(ctx context.Context, id model.AccountID) (*model.Account, error) UpdateBalance(ctx context.Context, id model.AccountID, balance model.Money) error }
AccountRepository is the interface that wraps account datasource methods.
type IdempotencyRepository ¶
type IdempotencyRepository interface { Get(ctx context.Context, key string) ([]byte, error) Set(ctx context.Context, key string, value []byte, duration time.Duration) error }
IdempotencyRepository is the interface that wraps idempotency datasource methods.
Click to show internal directories.
Click to hide internal directories.