query

package
v1.27.0-beta.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

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) (*a.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) (*a.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) ([]*a.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) ([]*s.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) ([]*l.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) ([]*a.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) ([]*s.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) ([]*l.Ledger, error)

GetAllMetadataLedgers fetch all Ledgers from the repository

func (*UseCase) GetAllMetadataOrganizations

func (uc *UseCase) GetAllMetadataOrganizations(ctx context.Context, filter commonHTTP.QueryHeader) ([]*o.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) ([]*p.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) ([]*r.Product, error)

GetAllMetadataProducts fetch all Products from the repository

func (*UseCase) GetAllOrganizations

func (uc *UseCase) GetAllOrganizations(ctx context.Context, filter commonHTTP.QueryHeader) ([]*o.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) ([]*p.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) ([]*r.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) (*s.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) (*l.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) (*o.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) (*p.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) (*r.Product, error)

GetProductByID get a Product from the repository by given id.

func (*UseCase) ListAccountsByAlias added in v1.10.0

func (uc *UseCase) ListAccountsByAlias(ctx context.Context, organizationID, ledgerID uuid.UUID, aliases []string) ([]*a.Account, error)

ListAccountsByAlias get Accounts from the repository by given alias.

func (*UseCase) ListAccountsByIDs added in v1.10.0

func (uc *UseCase) ListAccountsByIDs(ctx context.Context, organizationID, ledgerID uuid.UUID, ids []uuid.UUID) ([]*a.Account, error)

ListAccountsByIDs get Accounts from the repository by given ids.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL