Documentation ¶
Index ¶
- type UseCase
- func (uc *UseCase) GetAccountByID(ctx context.Context, organizationID, ledgerID uuid.UUID, ...) (*mmodel.Account, error)
- func (uc *UseCase) GetAccountByIDWithDeleted(ctx context.Context, organizationID, ledgerID uuid.UUID, ...) (*mmodel.Account, error)
- func (uc *UseCase) GetAllAccount(ctx context.Context, organizationID, ledgerID uuid.UUID, ...) ([]*mmodel.Account, error)
- func (uc *UseCase) GetAllAssets(ctx context.Context, organizationID, ledgerID uuid.UUID, ...) ([]*mmodel.Asset, error)
- func (uc *UseCase) GetAllLedgers(ctx context.Context, organizationID uuid.UUID, filter commonHTTP.QueryHeader) ([]*mmodel.Ledger, error)
- func (uc *UseCase) GetAllMetadataAccounts(ctx context.Context, organizationID, ledgerID uuid.UUID, ...) ([]*mmodel.Account, error)
- func (uc *UseCase) GetAllMetadataAssets(ctx context.Context, organizationID, ledgerID uuid.UUID, ...) ([]*mmodel.Asset, error)
- func (uc *UseCase) GetAllMetadataLedgers(ctx context.Context, organizationID uuid.UUID, filter commonHTTP.QueryHeader) ([]*mmodel.Ledger, error)
- func (uc *UseCase) GetAllMetadataOrganizations(ctx context.Context, filter commonHTTP.QueryHeader) ([]*mmodel.Organization, error)
- func (uc *UseCase) GetAllMetadataPortfolios(ctx context.Context, organizationID, ledgerID uuid.UUID, ...) ([]*mmodel.Portfolio, error)
- func (uc *UseCase) GetAllMetadataProducts(ctx context.Context, organizationID, ledgerID uuid.UUID, ...) ([]*mmodel.Product, error)
- func (uc *UseCase) GetAllOrganizations(ctx context.Context, filter commonHTTP.QueryHeader) ([]*mmodel.Organization, error)
- func (uc *UseCase) GetAllPortfolio(ctx context.Context, organizationID, ledgerID uuid.UUID, ...) ([]*mmodel.Portfolio, error)
- func (uc *UseCase) GetAllProducts(ctx context.Context, organizationID, ledgerID uuid.UUID, ...) ([]*mmodel.Product, error)
- func (uc *UseCase) GetAssetByID(ctx context.Context, organizationID, ledgerID, id uuid.UUID) (*mmodel.Asset, error)
- func (uc *UseCase) GetLedgerByID(ctx context.Context, organizationID, id uuid.UUID) (*mmodel.Ledger, error)
- func (uc *UseCase) GetOrganizationByID(ctx context.Context, id uuid.UUID) (*mmodel.Organization, error)
- func (uc *UseCase) GetPortfolioByID(ctx context.Context, organizationID, ledgerID, id uuid.UUID) (*mmodel.Portfolio, error)
- func (uc *UseCase) GetProductByID(ctx context.Context, organizationID, ledgerID, id uuid.UUID) (*mmodel.Product, error)
- func (uc *UseCase) ListAccountsByAlias(ctx context.Context, organizationID, ledgerID uuid.UUID, aliases []string) ([]*mmodel.Account, error)
- func (uc *UseCase) ListAccountsByIDs(ctx context.Context, organizationID, ledgerID uuid.UUID, ids []uuid.UUID) ([]*mmodel.Account, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UseCase ¶
type UseCase struct { // OrganizationRepo provides an abstraction on top of the organization data source. OrganizationRepo o.Repository // LedgerRepo provides an abstraction on top of the ledger data source. LedgerRepo l.Repository // ProductRepo provides an abstraction on top of the product data source. ProductRepo r.Repository // PortfolioRepo provides an abstraction on top of the portfolio data source. PortfolioRepo p.Repository // AccountRepo provides an abstraction on top of the account data source. AccountRepo a.Repository // AssetRepo provides an abstraction on top of the asset data source. AssetRepo s.Repository // MetadataRepo provides an abstraction on top of the metadata data source. MetadataRepo m.Repository // RabbitMQRepo provides an abstraction on top of the consumer rabbitmq. RabbitMQRepo rmq.ConsumerRepository }
UseCase is a struct that aggregates various repositories for simplified access in use case implementations.
func (*UseCase) GetAccountByID ¶
func (uc *UseCase) GetAccountByID(ctx context.Context, organizationID, ledgerID uuid.UUID, portfolioID *uuid.UUID, id uuid.UUID) (*mmodel.Account, error)
GetAccountByID get an Account from the repository by given id.
func (*UseCase) GetAccountByIDWithDeleted ¶ added in v1.26.0
func (uc *UseCase) GetAccountByIDWithDeleted(ctx context.Context, organizationID, ledgerID uuid.UUID, portfolioID *uuid.UUID, id uuid.UUID) (*mmodel.Account, error)
GetAccountByIDWithDeleted get an Account from the repository by given id (including soft-deleted ones).
func (*UseCase) GetAllAccount ¶
func (uc *UseCase) GetAllAccount(ctx context.Context, organizationID, ledgerID uuid.UUID, portfolioID *uuid.UUID, filter commonHTTP.QueryHeader) ([]*mmodel.Account, error)
GetAllAccount fetch all Account from the repository
func (*UseCase) GetAllAssets ¶ added in v1.11.0
func (uc *UseCase) GetAllAssets(ctx context.Context, organizationID, ledgerID uuid.UUID, filter commonHTTP.QueryHeader) ([]*mmodel.Asset, error)
GetAllAssets fetch all Asset from the repository
func (*UseCase) GetAllLedgers ¶
func (uc *UseCase) GetAllLedgers(ctx context.Context, organizationID uuid.UUID, filter commonHTTP.QueryHeader) ([]*mmodel.Ledger, error)
GetAllLedgers fetch all Ledgers from the repository
func (*UseCase) GetAllMetadataAccounts ¶
func (uc *UseCase) GetAllMetadataAccounts(ctx context.Context, organizationID, ledgerID uuid.UUID, portfolioID *uuid.UUID, filter commonHTTP.QueryHeader) ([]*mmodel.Account, error)
GetAllMetadataAccounts fetch all Accounts from the repository
func (*UseCase) GetAllMetadataAssets ¶ added in v1.11.0
func (uc *UseCase) GetAllMetadataAssets(ctx context.Context, organizationID, ledgerID uuid.UUID, filter commonHTTP.QueryHeader) ([]*mmodel.Asset, error)
GetAllMetadataAssets fetch all Assets from the repository
func (*UseCase) GetAllMetadataLedgers ¶
func (uc *UseCase) GetAllMetadataLedgers(ctx context.Context, organizationID uuid.UUID, filter commonHTTP.QueryHeader) ([]*mmodel.Ledger, error)
GetAllMetadataLedgers fetch all Ledgers from the repository
func (*UseCase) GetAllMetadataOrganizations ¶
func (uc *UseCase) GetAllMetadataOrganizations(ctx context.Context, filter commonHTTP.QueryHeader) ([]*mmodel.Organization, error)
GetAllMetadataOrganizations fetch all Organizations from the repository
func (*UseCase) GetAllMetadataPortfolios ¶
func (uc *UseCase) GetAllMetadataPortfolios(ctx context.Context, organizationID, ledgerID uuid.UUID, filter commonHTTP.QueryHeader) ([]*mmodel.Portfolio, error)
GetAllMetadataPortfolios fetch all Portfolios from the repository
func (*UseCase) GetAllMetadataProducts ¶
func (uc *UseCase) GetAllMetadataProducts(ctx context.Context, organizationID, ledgerID uuid.UUID, filter commonHTTP.QueryHeader) ([]*mmodel.Product, error)
GetAllMetadataProducts fetch all Products from the repository
func (*UseCase) GetAllOrganizations ¶
func (uc *UseCase) GetAllOrganizations(ctx context.Context, filter commonHTTP.QueryHeader) ([]*mmodel.Organization, error)
GetAllOrganizations fetch all Organizations from the repository
func (*UseCase) GetAllPortfolio ¶
func (uc *UseCase) GetAllPortfolio(ctx context.Context, organizationID, ledgerID uuid.UUID, filter commonHTTP.QueryHeader) ([]*mmodel.Portfolio, error)
GetAllPortfolio fetch all Portfolio from the repository
func (*UseCase) GetAllProducts ¶
func (uc *UseCase) GetAllProducts(ctx context.Context, organizationID, ledgerID uuid.UUID, filter commonHTTP.QueryHeader) ([]*mmodel.Product, error)
GetAllProducts fetch all Product from the repository
func (*UseCase) GetAssetByID ¶ added in v1.11.0
func (uc *UseCase) GetAssetByID(ctx context.Context, organizationID, ledgerID, id uuid.UUID) (*mmodel.Asset, error)
GetAssetByID get an Asset from the repository by given id.
func (*UseCase) GetLedgerByID ¶
func (uc *UseCase) GetLedgerByID(ctx context.Context, organizationID, id uuid.UUID) (*mmodel.Ledger, error)
GetLedgerByID Get a ledger from the repository by given id.
func (*UseCase) GetOrganizationByID ¶
func (uc *UseCase) GetOrganizationByID(ctx context.Context, id uuid.UUID) (*mmodel.Organization, error)
GetOrganizationByID fetch a new organization from the repository
func (*UseCase) GetPortfolioByID ¶
func (uc *UseCase) GetPortfolioByID(ctx context.Context, organizationID, ledgerID, id uuid.UUID) (*mmodel.Portfolio, error)
GetPortfolioByID get a Portfolio from the repository by given id.
func (*UseCase) GetProductByID ¶
func (uc *UseCase) GetProductByID(ctx context.Context, organizationID, ledgerID, id uuid.UUID) (*mmodel.Product, error)
GetProductByID get a Product from the repository by given id.
Source Files ¶
- get-alias-accounts.go
- get-all-accounts.go
- get-all-asset.go
- get-all-ledgers.go
- get-all-metadata-accounts.go
- get-all-metadata-asset.go
- get-all-metadata-ledgers.go
- get-all-metadata-organizations.go
- get-all-metadata-portfolios.go
- get-all-metadata-products.go
- get-all-organizations.go
- get-all-portfolios.go
- get-all-products.go
- get-id-account-with-deleted.go
- get-id-account.go
- get-id-asset.go
- get-id-ledger.go
- get-id-organization.go
- get-id-portfolio.go
- get-id-product.go
- get-ids-accounts.go
- query.go