Documentation ¶
Index ¶
- type OperationPostgreSQLRepository
- func (r *OperationPostgreSQLRepository) Create(ctx context.Context, operation *o.Operation) (*o.Operation, error)
- func (r *OperationPostgreSQLRepository) Delete(ctx context.Context, organizationID, ledgerID, id uuid.UUID) error
- func (r *OperationPostgreSQLRepository) Find(ctx context.Context, organizationID, ledgerID, id uuid.UUID) (*o.Operation, error)
- func (r *OperationPostgreSQLRepository) FindAll(ctx context.Context, organizationID, ledgerID, transactionID uuid.UUID, ...) ([]*o.Operation, error)
- func (r *OperationPostgreSQLRepository) ListByIDs(ctx context.Context, organizationID, ledgerID uuid.UUID, ids []uuid.UUID) ([]*o.Operation, error)
- func (r *OperationPostgreSQLRepository) Update(ctx context.Context, organizationID, ledgerID, id uuid.UUID, ...) (*o.Operation, error)
- 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 OperationPostgreSQLRepository ¶ added in v1.13.0
type OperationPostgreSQLRepository struct {
// contains filtered or unexported fields
}
OperationPostgreSQLRepository is a Postgresql-specific implementation of the OperationRepository.
func NewOperationPostgreSQLRepository ¶ added in v1.13.0
func NewOperationPostgreSQLRepository(pc *mpostgres.PostgresConnection) *OperationPostgreSQLRepository
NewOperationPostgreSQLRepository returns a new instance of OperationPostgreSQLRepository using the given Postgres connection.
func (*OperationPostgreSQLRepository) Create ¶ added in v1.13.0
func (r *OperationPostgreSQLRepository) Create(ctx context.Context, operation *o.Operation) (*o.Operation, error)
Create a new Operation entity into Postgresql and returns it.
func (*OperationPostgreSQLRepository) Delete ¶ added in v1.13.0
func (r *OperationPostgreSQLRepository) Delete(ctx context.Context, organizationID, ledgerID, id uuid.UUID) error
Delete removes a Operation entity from the database using the provided IDs.
func (*OperationPostgreSQLRepository) Find ¶ added in v1.13.0
func (r *OperationPostgreSQLRepository) Find(ctx context.Context, organizationID, ledgerID, id uuid.UUID) (*o.Operation, error)
Find retrieves a Operation entity from the database using the provided ID.
func (*OperationPostgreSQLRepository) FindAll ¶ added in v1.13.0
func (r *OperationPostgreSQLRepository) FindAll(ctx context.Context, organizationID, ledgerID, transactionID uuid.UUID, limit, page int) ([]*o.Operation, error)
FindAll retrieves Operations entities from the database.
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.