Documentation ¶
Overview ¶
Package accountrepo manages repository layer of accounts.
Index ¶
- type RepoPGS
- func (r *RepoPGS) AddBalance(ctx context.Context, amount string, id int32) (domain.Account, error)
- func (r *RepoPGS) Create(ctx context.Context, owner, balance, currency string) (domain.Account, error)
- func (r *RepoPGS) Delete(ctx context.Context, id int32) error
- func (r *RepoPGS) Get(ctx context.Context, id int32) (domain.Account, error)
- func (r *RepoPGS) List(ctx context.Context, owner string, limit, offset int32) ([]domain.Account, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RepoPGS ¶
type RepoPGS struct {
// contains filtered or unexported fields
}
RepoPGS facilitates account repository layer logic.
func NewRepoPGS ¶
func NewRepoPGS(db dbpkg.SQLInterface) *RepoPGS
NewRepoPGS returns account RepoPGS.
func (*RepoPGS) AddBalance ¶
AddBalance changes the account's balance and returns the changed account.
func (*RepoPGS) Create ¶
func (r *RepoPGS) Create(ctx context.Context, owner, balance, currency string) (domain.Account, error)
Create creates the account and then returns it.
Click to show internal directories.
Click to hide internal directories.