Documentation ¶
Index ¶
- Variables
- func CreateTestAccountBatch(pool *pgxpool.Pool, ids []account.ID, cpfs []string, amount []int) error
- type Repository
- func (r Repository) Create(ctx context.Context, accountInstance account.Account) (account.Account, error)
- func (r Repository) CreditAccount(ctx context.Context, id account.ID, amount money.Money) error
- func (r Repository) DebitAccount(ctx context.Context, id account.ID, amount money.Money) error
- func (r Repository) Fetch(ctx context.Context) ([]account.Account, error)
- func (r Repository) GetBalance(ctx context.Context, id account.ID) (int, error)
- func (r Repository) GetByCpf(ctx context.Context, cpf cpf.Cpf) (account.Account, error)
- func (r Repository) GetByID(ctx context.Context, id account.ID) (account.Account, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrQuery = errors.New("failed to run query") ErrScanningRows = errors.New("failed to scan rows returned from query") )
Functions ¶
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(pool *pgxpool.Pool) *Repository
func (Repository) CreditAccount ¶
func (Repository) DebitAccount ¶
func (Repository) GetBalance ¶
Click to show internal directories.
Click to hide internal directories.