Documentation ¶
Index ¶
- type TransactionPostgreSQLRepository
- func (r *TransactionPostgreSQLRepository) Create(ctx context.Context, transaction *t.Transaction) (*t.Transaction, error)
- func (r *TransactionPostgreSQLRepository) Delete(ctx context.Context, organizationID, ledgerID, id uuid.UUID) error
- func (r *TransactionPostgreSQLRepository) Find(ctx context.Context, organizationID, ledgerID, id uuid.UUID) (*t.Transaction, error)
- func (r *TransactionPostgreSQLRepository) FindAll(ctx context.Context, organizationID, ledgerID uuid.UUID, limit, page int) ([]*t.Transaction, error)
- func (r *TransactionPostgreSQLRepository) ListByIDs(ctx context.Context, organizationID, ledgerID uuid.UUID, ids []uuid.UUID) ([]*t.Transaction, error)
- func (r *TransactionPostgreSQLRepository) Update(ctx context.Context, organizationID, ledgerID, id uuid.UUID, ...) (*t.Transaction, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TransactionPostgreSQLRepository ¶
type TransactionPostgreSQLRepository struct {
// contains filtered or unexported fields
}
TransactionPostgreSQLRepository is a Postgresql-specific implementation of the TransactionRepository.
func NewTransactionPostgreSQLRepository ¶
func NewTransactionPostgreSQLRepository(pc *mpostgres.PostgresConnection) *TransactionPostgreSQLRepository
NewTransactionPostgreSQLRepository returns a new instance of TransactionPostgreSQLRepository using the given Postgres connection.
func (*TransactionPostgreSQLRepository) Create ¶
func (r *TransactionPostgreSQLRepository) Create(ctx context.Context, transaction *t.Transaction) (*t.Transaction, error)
Create a new Transaction entity into Postgresql and returns it.
func (*TransactionPostgreSQLRepository) Delete ¶
func (r *TransactionPostgreSQLRepository) Delete(ctx context.Context, organizationID, ledgerID, id uuid.UUID) error
Delete removes a Transaction entity from the database using the provided IDs.
func (*TransactionPostgreSQLRepository) Find ¶
func (r *TransactionPostgreSQLRepository) Find(ctx context.Context, organizationID, ledgerID, id uuid.UUID) (*t.Transaction, error)
Find retrieves a Transaction entity from the database using the provided ID.
func (*TransactionPostgreSQLRepository) FindAll ¶
func (r *TransactionPostgreSQLRepository) FindAll(ctx context.Context, organizationID, ledgerID uuid.UUID, limit, page int) ([]*t.Transaction, error)
FindAll retrieves Transactions entities from the database.
func (*TransactionPostgreSQLRepository) ListByIDs ¶
func (r *TransactionPostgreSQLRepository) ListByIDs(ctx context.Context, organizationID, ledgerID uuid.UUID, ids []uuid.UUID) ([]*t.Transaction, error)
ListByIDs retrieves Transaction entities from the database using the provided IDs.
func (*TransactionPostgreSQLRepository) Update ¶
func (r *TransactionPostgreSQLRepository) Update(ctx context.Context, organizationID, ledgerID, id uuid.UUID, transaction *t.Transaction) (*t.Transaction, error)
Update a Transaction entity into Postgresql and returns the Transaction updated.