Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Balance ¶
type Balance struct { Available *float64 `json:"available"` OnHold *float64 `json:"onHold"` Scale *float64 `json:"scale"` }
Balance structure for marshaling/unmarshalling JSON.
type Operation ¶
type Operation struct { ID string `json:"id"` TransactionID string `json:"transactionId"` Description string `json:"description"` Type string `json:"type"` AssetCode string `json:"assetCode"` ChartOfAccounts string `json:"chartOfAccounts"` Amount Amount `json:"amount"` Balance Balance `json:"balance"` BalanceAfter Balance `json:"balanceAfter"` Status Status `json:"status"` AccountID string `json:"accountId"` AccountAlias string `json:"accountAlias"` PortfolioID string `json:"portfolioId"` OrganizationID string `json:"organizationId"` LedgerID string `json:"ledgerId"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` DeletedAt *time.Time `json:"deletedAt"` Metadata map[string]any `json:"metadata"` }
Operation is a struct designed to encapsulate response payload data.
type OperationPostgreSQLModel ¶
type OperationPostgreSQLModel struct { ID string TransactionID string Description string Type string AssetCode string Amount *float64 AmountScale *float64 AvailableBalance *float64 BalanceScale *float64 OnHoldBalance *float64 AvailableBalanceAfter *float64 OnHoldBalanceAfter *float64 BalanceScaleAfter *float64 Status string StatusDescription *string AccountID string AccountAlias string PortfolioID string ChartOfAccounts string OrganizationID string LedgerID string CreatedAt time.Time UpdatedAt time.Time DeletedAt sql.NullTime Metadata map[string]any }
OperationPostgreSQLModel represents the entity OperationPostgreSQLModel into SQL context in Database
func (*OperationPostgreSQLModel) FromEntity ¶
func (t *OperationPostgreSQLModel) FromEntity(operation *Operation)
FromEntity converts an entity Operation to OperationPostgreSQLModel
func (*OperationPostgreSQLModel) ToEntity ¶
func (t *OperationPostgreSQLModel) ToEntity() *Operation
ToEntity converts an OperationPostgreSQLModel to entity Operation
type Repository ¶
type Repository interface { Create(ctx context.Context, operation *Operation) (*Operation, error) FindAll(ctx context.Context, organizationID, ledgerID, transactionID uuid.UUID, limit, page int) ([]*Operation, error) FindAllByAccount(ctx context.Context, organizationID, ledgerID, accountID uuid.UUID, limit, page int) ([]*Operation, error) FindAllByPortfolio(ctx context.Context, organizationID, ledgerID, portfolioID uuid.UUID, limit, page int) ([]*Operation, error) Find(ctx context.Context, organizationID, ledgerID, transactionID, id uuid.UUID) (*Operation, error) FindByAccount(ctx context.Context, organizationID, ledgerID, accountID, id uuid.UUID) (*Operation, error) FindByPortfolio(ctx context.Context, organizationID, ledgerID, portfolioID, id uuid.UUID) (*Operation, error) ListByIDs(ctx context.Context, organizationID, ledgerID uuid.UUID, ids []uuid.UUID) ([]*Operation, error) Update(ctx context.Context, organizationID, ledgerID, transactionID, id uuid.UUID, operation *Operation) (*Operation, error) Delete(ctx context.Context, organizationID, ledgerID, id uuid.UUID) error }
Repository provides an interface for operations related to operation template entities.
type UpdateOperationInput ¶ added in v1.18.0
type UpdateOperationInput struct { Description string `json:"description"` Metadata map[string]any `json:"metadata,omitempty"` }
UpdateOperationInput is a struct design to encapsulate payload data.
Click to show internal directories.
Click to hide internal directories.