Documentation
¶
Overview ¶
Package balance is a generated GoMock package.
Index ¶
- type BalancePostgreSQLModel
- type BalancePostgreSQLRepository
- func (r *BalancePostgreSQLRepository) Create(ctx context.Context, balance *mmodel.Balance) error
- func (r *BalancePostgreSQLRepository) ListByAccountIDs(ctx context.Context, organizationID, ledgerID uuid.UUID, ...) ([]*mmodel.Balance, error)
- func (r *BalancePostgreSQLRepository) ListByAliases(ctx context.Context, organizationID, ledgerID uuid.UUID, aliases []string) ([]*mmodel.Balance, error)
- func (r *BalancePostgreSQLRepository) SelectForUpdate(ctx context.Context, organizationID, ledgerID uuid.UUID, ...) error
- type MockRepository
- func (m *MockRepository) Create(arg0 context.Context, arg1 *mmodel.Balance) error
- func (m *MockRepository) EXPECT() *MockRepositoryMockRecorder
- func (m *MockRepository) ListByAccountIDs(arg0 context.Context, arg1, arg2 uuid.UUID, arg3 []uuid.UUID) ([]*mmodel.Balance, error)
- func (m *MockRepository) ListByAliases(arg0 context.Context, arg1, arg2 uuid.UUID, arg3 []string) ([]*mmodel.Balance, error)
- func (m *MockRepository) SelectForUpdate(arg0 context.Context, arg1, arg2 uuid.UUID, arg3 []*mmodel.Balance) error
- type MockRepositoryMockRecorder
- func (mr *MockRepositoryMockRecorder) Create(arg0, arg1 any) *gomock.Call
- func (mr *MockRepositoryMockRecorder) ListByAccountIDs(arg0, arg1, arg2, arg3 any) *gomock.Call
- func (mr *MockRepositoryMockRecorder) ListByAliases(arg0, arg1, arg2, arg3 any) *gomock.Call
- func (mr *MockRepositoryMockRecorder) SelectForUpdate(arg0, arg1, arg2, arg3 any) *gomock.Call
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BalancePostgreSQLModel ¶
type BalancePostgreSQLModel struct { ID string OrganizationID string LedgerID string AccountID string Alias string AssetCode string Available int64 OnHold int64 Scale int64 Version int64 AccountType string AllowSending bool AllowReceiving bool CreatedAt time.Time UpdatedAt time.Time DeletedAt sql.NullTime }
BalancePostgreSQLModel represents the entity Balance into SQL context in Database
func (*BalancePostgreSQLModel) FromEntity ¶
func (b *BalancePostgreSQLModel) FromEntity(balance *mmodel.Balance)
FromEntity converts a request entity Balance to BalancePostgreSQLModel
func (*BalancePostgreSQLModel) ToEntity ¶
func (b *BalancePostgreSQLModel) ToEntity() *mmodel.Balance
ToEntity converts an BalancePostgreSQLModel to a response entity Balance
type BalancePostgreSQLRepository ¶
type BalancePostgreSQLRepository struct {
// contains filtered or unexported fields
}
BalancePostgreSQLRepository is a Postgresql-specific implementation of the BalanceRepository.
func NewBalancePostgreSQLRepository ¶
func NewBalancePostgreSQLRepository(pc *mpostgres.PostgresConnection) *BalancePostgreSQLRepository
NewBalancePostgreSQLRepository returns a new instance of BalancePostgreSQLRepository using the given Postgres connection.
func (*BalancePostgreSQLRepository) ListByAccountIDs ¶
func (r *BalancePostgreSQLRepository) ListByAccountIDs(ctx context.Context, organizationID, ledgerID uuid.UUID, accountIds []uuid.UUID) ([]*mmodel.Balance, error)
ListByAccountIDs list Balances entity from the database using the provided accountIDs.
func (*BalancePostgreSQLRepository) ListByAliases ¶
func (r *BalancePostgreSQLRepository) ListByAliases(ctx context.Context, organizationID, ledgerID uuid.UUID, aliases []string) ([]*mmodel.Balance, error)
ListByAliases list Balances entity from the database using the provided aliases.
func (*BalancePostgreSQLRepository) SelectForUpdate ¶
func (r *BalancePostgreSQLRepository) SelectForUpdate(ctx context.Context, organizationID, ledgerID uuid.UUID, balances []*mmodel.Balance) error
SelectForUpdate a Balance entity into Postgresql.
type MockRepository ¶
type MockRepository struct {
// contains filtered or unexported fields
}
MockRepository is a mock of Repository interface.
func NewMockRepository ¶
func NewMockRepository(ctrl *gomock.Controller) *MockRepository
NewMockRepository creates a new mock instance.
func (*MockRepository) EXPECT ¶
func (m *MockRepository) EXPECT() *MockRepositoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockRepository) ListByAccountIDs ¶
func (m *MockRepository) ListByAccountIDs(arg0 context.Context, arg1, arg2 uuid.UUID, arg3 []uuid.UUID) ([]*mmodel.Balance, error)
ListByAccountIDs mocks base method.
func (*MockRepository) ListByAliases ¶
func (m *MockRepository) ListByAliases(arg0 context.Context, arg1, arg2 uuid.UUID, arg3 []string) ([]*mmodel.Balance, error)
ListByAliases mocks base method.
func (*MockRepository) SelectForUpdate ¶
func (m *MockRepository) SelectForUpdate(arg0 context.Context, arg1, arg2 uuid.UUID, arg3 []*mmodel.Balance) error
SelectForUpdate mocks base method.
type MockRepositoryMockRecorder ¶
type MockRepositoryMockRecorder struct {
// contains filtered or unexported fields
}
MockRepositoryMockRecorder is the mock recorder for MockRepository.
func (*MockRepositoryMockRecorder) Create ¶
func (mr *MockRepositoryMockRecorder) Create(arg0, arg1 any) *gomock.Call
Create indicates an expected call of Create.
func (*MockRepositoryMockRecorder) ListByAccountIDs ¶
func (mr *MockRepositoryMockRecorder) ListByAccountIDs(arg0, arg1, arg2, arg3 any) *gomock.Call
ListByAccountIDs indicates an expected call of ListByAccountIDs.
func (*MockRepositoryMockRecorder) ListByAliases ¶
func (mr *MockRepositoryMockRecorder) ListByAliases(arg0, arg1, arg2, arg3 any) *gomock.Call
ListByAliases indicates an expected call of ListByAliases.
func (*MockRepositoryMockRecorder) SelectForUpdate ¶
func (mr *MockRepositoryMockRecorder) SelectForUpdate(arg0, arg1, arg2, arg3 any) *gomock.Call
SelectForUpdate indicates an expected call of SelectForUpdate.
type Repository ¶
type Repository interface { Create(ctx context.Context, balance *mmodel.Balance) error ListByAccountIDs(ctx context.Context, organizationID, ledgerID uuid.UUID, ids []uuid.UUID) ([]*mmodel.Balance, error) ListByAliases(ctx context.Context, organizationID, ledgerID uuid.UUID, aliases []string) ([]*mmodel.Balance, error) SelectForUpdate(ctx context.Context, organizationID, ledgerID uuid.UUID, balances []*mmodel.Balance) error }
Repository provides an interface for operations related to balance template entities.