Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreatePortfolioInput ¶
type CreatePortfolioInput struct { EntityID string `json:"entityId"` Name string `json:"name"` Status Status `json:"status"` Metadata map[string]any `json:"metadata"` }
CreatePortfolioInput is a struct design to encapsulate request create payload data.
type Portfolio ¶
type Portfolio struct { ID string `json:"id"` Name string `json:"name"` EntityID string `json:"entityId"` LedgerID string `json:"ledgerId"` OrganizationID string `json:"organizationId"` Status Status `json:"status"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` DeletedAt *time.Time `json:"deletedAt"` Metadata map[string]any `json:"metadata"` }
Portfolio is a struct designed to encapsulate request update payload data.
type PortfolioPostgreSQLModel ¶
type PortfolioPostgreSQLModel struct { ID string Name string EntityID string LedgerID string OrganizationID string Status string StatusDescription *string AllowSending bool AllowReceiving bool 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 *Portfolio)
FromEntity converts an entity.Portfolio to PortfolioPostgreSQLModel
func (*PortfolioPostgreSQLModel) ToEntity ¶
func (t *PortfolioPostgreSQLModel) ToEntity() *Portfolio
ToEntity converts an PortfolioPostgreSQLModel to entity.Portfolio
type Repository ¶
type Repository interface { Create(ctx context.Context, portfolio *Portfolio) (*Portfolio, error) FindByIDEntity(ctx context.Context, organizationID, ledgerID, entityID uuid.UUID) (*Portfolio, error) FindAll(ctx context.Context, organizationID, ledgerID uuid.UUID, limit, page int) ([]*Portfolio, error) Find(ctx context.Context, organizationID, ledgerID, id uuid.UUID) (*Portfolio, error) ListByIDs(ctx context.Context, organizationID, ledgerID uuid.UUID, ids []uuid.UUID) ([]*Portfolio, error) Update(ctx context.Context, organizationID, ledgerID, id uuid.UUID, portfolio *Portfolio) (*Portfolio, error) Delete(ctx context.Context, organizationID, ledgerID, id uuid.UUID) error }
Repository provides an interface for operations related to portfolio entities.
Click to show internal directories.
Click to hide internal directories.