Documentation ¶
Overview ¶
Package portfolio is a generated GoMock package.
Index ¶
- type MockRepository
- func (m *MockRepository) Create(arg0 context.Context, arg1 *mmodel.Portfolio) (*mmodel.Portfolio, error)
- func (m *MockRepository) Delete(arg0 context.Context, arg1, arg2, arg3 uuid.UUID) error
- func (m *MockRepository) EXPECT() *MockRepositoryMockRecorder
- func (m *MockRepository) Find(arg0 context.Context, arg1, arg2, arg3 uuid.UUID) (*mmodel.Portfolio, error)
- func (m *MockRepository) FindAll(arg0 context.Context, arg1, arg2 uuid.UUID, arg3, arg4 int) ([]*mmodel.Portfolio, error)
- func (m *MockRepository) FindByIDEntity(arg0 context.Context, arg1, arg2, arg3 uuid.UUID) (*mmodel.Portfolio, error)
- func (m *MockRepository) ListByIDs(arg0 context.Context, arg1, arg2 uuid.UUID, arg3 []uuid.UUID) ([]*mmodel.Portfolio, error)
- func (m *MockRepository) Update(arg0 context.Context, arg1, arg2, arg3 uuid.UUID, arg4 *mmodel.Portfolio) (*mmodel.Portfolio, error)
- type MockRepositoryMockRecorder
- func (mr *MockRepositoryMockRecorder) Create(arg0, arg1 any) *gomock.Call
- func (mr *MockRepositoryMockRecorder) Delete(arg0, arg1, arg2, arg3 any) *gomock.Call
- func (mr *MockRepositoryMockRecorder) Find(arg0, arg1, arg2, arg3 any) *gomock.Call
- func (mr *MockRepositoryMockRecorder) FindAll(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call
- func (mr *MockRepositoryMockRecorder) FindByIDEntity(arg0, arg1, arg2, arg3 any) *gomock.Call
- func (mr *MockRepositoryMockRecorder) ListByIDs(arg0, arg1, arg2, arg3 any) *gomock.Call
- func (mr *MockRepositoryMockRecorder) Update(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call
- type PortfolioPostgreSQLModel
- type PortfolioPostgreSQLRepository
- func (r *PortfolioPostgreSQLRepository) Create(ctx context.Context, portfolio *mmodel.Portfolio) (*mmodel.Portfolio, error)
- func (r *PortfolioPostgreSQLRepository) Delete(ctx context.Context, organizationID, ledgerID, id uuid.UUID) error
- func (r *PortfolioPostgreSQLRepository) Find(ctx context.Context, organizationID, ledgerID, id uuid.UUID) (*mmodel.Portfolio, error)
- func (r *PortfolioPostgreSQLRepository) FindAll(ctx context.Context, organizationID, ledgerID uuid.UUID, limit, page int) ([]*mmodel.Portfolio, error)
- func (r *PortfolioPostgreSQLRepository) FindByIDEntity(ctx context.Context, organizationID, ledgerID, entityID uuid.UUID) (*mmodel.Portfolio, error)
- func (r *PortfolioPostgreSQLRepository) ListByIDs(ctx context.Context, organizationID, ledgerID uuid.UUID, ids []uuid.UUID) ([]*mmodel.Portfolio, error)
- func (r *PortfolioPostgreSQLRepository) Update(ctx context.Context, organizationID, ledgerID, id uuid.UUID, ...) (*mmodel.Portfolio, error)
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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) Create ¶
func (m *MockRepository) Create(arg0 context.Context, arg1 *mmodel.Portfolio) (*mmodel.Portfolio, error)
Create mocks base method.
func (*MockRepository) EXPECT ¶
func (m *MockRepository) EXPECT() *MockRepositoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockRepository) Find ¶
func (m *MockRepository) Find(arg0 context.Context, arg1, arg2, arg3 uuid.UUID) (*mmodel.Portfolio, error)
Find mocks base method.
func (*MockRepository) FindAll ¶
func (m *MockRepository) FindAll(arg0 context.Context, arg1, arg2 uuid.UUID, arg3, arg4 int) ([]*mmodel.Portfolio, error)
FindAll mocks base method.
func (*MockRepository) FindByIDEntity ¶
func (m *MockRepository) FindByIDEntity(arg0 context.Context, arg1, arg2, arg3 uuid.UUID) (*mmodel.Portfolio, error)
FindByIDEntity 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) Delete ¶
func (mr *MockRepositoryMockRecorder) Delete(arg0, arg1, arg2, arg3 any) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockRepositoryMockRecorder) Find ¶
func (mr *MockRepositoryMockRecorder) Find(arg0, arg1, arg2, arg3 any) *gomock.Call
Find indicates an expected call of Find.
func (*MockRepositoryMockRecorder) FindAll ¶
func (mr *MockRepositoryMockRecorder) FindAll(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call
FindAll indicates an expected call of FindAll.
func (*MockRepositoryMockRecorder) FindByIDEntity ¶
func (mr *MockRepositoryMockRecorder) FindByIDEntity(arg0, arg1, arg2, arg3 any) *gomock.Call
FindByIDEntity indicates an expected call of FindByIDEntity.
type PortfolioPostgreSQLModel ¶
type PortfolioPostgreSQLModel struct { ID string Name string EntityID string LedgerID string OrganizationID string Status string StatusDescription *string CreatedAt time.Time UpdatedAt time.Time DeletedAt sql.NullTime Metadata map[string]any }
PortfolioPostgreSQLModel represents the entity Portfolio into SQL context in Database
func (*PortfolioPostgreSQLModel) FromEntity ¶
func (t *PortfolioPostgreSQLModel) FromEntity(portfolio *mmodel.Portfolio)
FromEntity converts an entity.Portfolio to PortfolioPostgreSQLModel
func (*PortfolioPostgreSQLModel) ToEntity ¶
func (t *PortfolioPostgreSQLModel) ToEntity() *mmodel.Portfolio
ToEntity converts an PortfolioPostgreSQLModel to entity.Portfolio
type PortfolioPostgreSQLRepository ¶
type PortfolioPostgreSQLRepository struct {
// contains filtered or unexported fields
}
PortfolioPostgreSQLRepository is a Postgresql-specific implementation of the PortfolioRepository.
func NewPortfolioPostgreSQLRepository ¶
func NewPortfolioPostgreSQLRepository(pc *mpostgres.PostgresConnection) *PortfolioPostgreSQLRepository
NewPortfolioPostgreSQLRepository returns a new instance of PortfolioPostgreSQLRepository using the given Postgres connection.
func (*PortfolioPostgreSQLRepository) Create ¶
func (r *PortfolioPostgreSQLRepository) Create(ctx context.Context, portfolio *mmodel.Portfolio) (*mmodel.Portfolio, error)
Create a new portfolio entity into Postgresql and returns it.
func (*PortfolioPostgreSQLRepository) Delete ¶
func (r *PortfolioPostgreSQLRepository) Delete(ctx context.Context, organizationID, ledgerID, id uuid.UUID) error
Delete removes a Portfolio entity from the database using the provided IDs.
func (*PortfolioPostgreSQLRepository) Find ¶
func (r *PortfolioPostgreSQLRepository) Find(ctx context.Context, organizationID, ledgerID, id uuid.UUID) (*mmodel.Portfolio, error)
Find retrieves a Portfolio entity from the database using the provided ID.
func (*PortfolioPostgreSQLRepository) FindAll ¶
func (r *PortfolioPostgreSQLRepository) FindAll(ctx context.Context, organizationID, ledgerID uuid.UUID, limit, page int) ([]*mmodel.Portfolio, error)
FindAll retrieves Portfolio entities from the database.
func (*PortfolioPostgreSQLRepository) FindByIDEntity ¶
func (r *PortfolioPostgreSQLRepository) FindByIDEntity(ctx context.Context, organizationID, ledgerID, entityID uuid.UUID) (*mmodel.Portfolio, error)
FindByIDEntity find portfolio from the database using the Entity id.
type Repository ¶
type Repository interface { Create(ctx context.Context, portfolio *mmodel.Portfolio) (*mmodel.Portfolio, error) FindByIDEntity(ctx context.Context, organizationID, ledgerID, entityID uuid.UUID) (*mmodel.Portfolio, error) FindAll(ctx context.Context, organizationID, ledgerID uuid.UUID, limit, page int) ([]*mmodel.Portfolio, error) Find(ctx context.Context, organizationID, ledgerID, id uuid.UUID) (*mmodel.Portfolio, error) ListByIDs(ctx context.Context, organizationID, ledgerID uuid.UUID, ids []uuid.UUID) ([]*mmodel.Portfolio, error) Update(ctx context.Context, organizationID, ledgerID, id uuid.UUID, portfolio *mmodel.Portfolio) (*mmodel.Portfolio, error) Delete(ctx context.Context, organizationID, ledgerID, id uuid.UUID) error }
Repository provides an interface for operations related to portfolio entities.