query

package
v1.32.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 19 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 organization.Repository

	// LedgerRepo provides an abstraction on top of the ledger data source.
	LedgerRepo ledger.Repository

	// ProductRepo provides an abstraction on top of the product data source.
	ProductRepo product.Repository

	// PortfolioRepo provides an abstraction on top of the portfolio data source.
	PortfolioRepo portfolio.Repository

	// AccountRepo provides an abstraction on top of the account data source.
	AccountRepo account.Repository

	// AssetRepo provides an abstraction on top of the asset data source.
	AssetRepo asset.Repository

	// MetadataRepo provides an abstraction on top of the metadata data source.
	MetadataRepo mongodb.Repository

	// RabbitMQRepo provides an abstraction on top of the consumer rabbitmq.
	RabbitMQRepo rabbitmq.ConsumerRepository

	// RedisRepo provides an abstraction on top of the redis consumer.
	RedisRepo redis.RedisRepository
}

UseCase is a struct that aggregates various repositories for simplified access in use case implementation.

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

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 http.QueryHeader) ([]*mmodel.Account, error)

GetAllAccount fetch all Account from the repository

func (*UseCase) GetAllAssets

func (uc *UseCase) GetAllAssets(ctx context.Context, organizationID, ledgerID uuid.UUID, filter http.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 http.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 http.QueryHeader) ([]*mmodel.Account, error)

GetAllMetadataAccounts fetch all Accounts from the repository

func (*UseCase) GetAllMetadataAssets

func (uc *UseCase) GetAllMetadataAssets(ctx context.Context, organizationID, ledgerID uuid.UUID, filter http.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 http.QueryHeader) ([]*mmodel.Ledger, error)

GetAllMetadataLedgers fetch all Ledgers from the repository

func (*UseCase) GetAllMetadataOrganizations

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

GetAllMetadataProducts fetch all Products from the repository

func (*UseCase) GetAllOrganizations

func (uc *UseCase) GetAllOrganizations(ctx context.Context, filter http.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 http.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 http.QueryHeader) ([]*mmodel.Product, error)

GetAllProducts fetch all Product from the repository

func (*UseCase) GetAssetByID

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.

func (*UseCase) ListAccountsByAlias

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

ListAccountsByAlias get Accounts from the repository by given alias.

func (*UseCase) ListAccountsByIDs

func (uc *UseCase) ListAccountsByIDs(ctx context.Context, organizationID, ledgerID uuid.UUID, ids []uuid.UUID) ([]*mmodel.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