Documentation ¶
Index ¶
- type PostgresStorage
- func (s *PostgresStorage) CreateAccount(ctx context.Context, reqAcc *types.RequestCreate) (*types.Account, error)
- func (s *PostgresStorage) DeleteAccount(ctx context.Context, id uuid.UUID) error
- func (s *PostgresStorage) DepositAccount(ctx context.Context, reqDep *types.RequestDeposit) (*types.Account, error)
- func (s *PostgresStorage) GetAccount(ctx context.Context) ([]*types.Account, error)
- func (s *PostgresStorage) GetAccountByCard(ctx context.Context, card string) (*types.Account, error)
- func (s *PostgresStorage) GetAccountByID(ctx context.Context, id uuid.UUID) (*types.Account, error)
- func (s *PostgresStorage) GetAccountStatement(ctx context.Context, id uuid.UUID) ([]string, error)
- func (s *PostgresStorage) GetPaymentByID(ctx context.Context, id uuid.UUID) (*types.Payment, error)
- func (s *PostgresStorage) SaveBalance(ctx context.Context, tx *sql.Tx, account *types.Account, ...) (*types.Account, error)
- func (s *PostgresStorage) SavePayment(ctx context.Context, tx *sql.Tx, payment *types.Payment) (*types.Payment, error)
- func (s *PostgresStorage) UpdateAccount(ctx context.Context, reqUp *types.RequestUpdate, id uuid.UUID) (*types.Account, error)
- func (s *PostgresStorage) UpdateStatement(ctx context.Context, tx *sql.Tx, id, paymentId uuid.UUID) (*types.Account, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresStorage ¶
type PostgresStorage struct {
// contains filtered or unexported fields
}
func NewPostgresStorage ¶
func NewPostgresStorage(db *sql.DB) *PostgresStorage
func (*PostgresStorage) CreateAccount ¶
func (s *PostgresStorage) CreateAccount(ctx context.Context, reqAcc *types.RequestCreate) (*types.Account, error)
func (*PostgresStorage) DeleteAccount ¶
func (*PostgresStorage) DepositAccount ¶
func (s *PostgresStorage) DepositAccount(ctx context.Context, reqDep *types.RequestDeposit) (*types.Account, error)
func (*PostgresStorage) GetAccount ¶
func (*PostgresStorage) GetAccountByCard ¶
func (*PostgresStorage) GetAccountByID ¶
func (*PostgresStorage) GetAccountStatement ¶
func (*PostgresStorage) GetPaymentByID ¶
func (*PostgresStorage) SaveBalance ¶
func (*PostgresStorage) SavePayment ¶
func (*PostgresStorage) UpdateAccount ¶
func (s *PostgresStorage) UpdateAccount(ctx context.Context, reqUp *types.RequestUpdate, id uuid.UUID) (*types.Account, error)
Click to show internal directories.
Click to hide internal directories.