query

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 16 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

	// InstrumentRepo provides an abstraction on top of the instrument data source.
	InstrumentRepo i.Repository

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

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, portfolioID, id string) (*a.Account, error)

GetAccountByID get an Account from the repository by given id.

func (*UseCase) GetAllAccount

func (uc *UseCase) GetAllAccount(ctx context.Context, organizationID, ledgerID, portfolioID string) ([]*a.Account, error)

GetAllAccount fetch all Account from the repository

func (*UseCase) GetAllInstruments

func (uc *UseCase) GetAllInstruments(ctx context.Context, organizationID, ledgerID string) ([]*i.Instrument, error)

GetAllInstruments fetch all Instrument from the repository

func (*UseCase) GetAllLedgers

func (uc *UseCase) GetAllLedgers(ctx context.Context, organizationID string) ([]*l.Ledger, error)

GetAllLedgers fetch all Ledgers from the repository

func (*UseCase) GetAllMetadataAccounts

func (uc *UseCase) GetAllMetadataAccounts(ctx context.Context, key, value, organizationID, ledgerID, portfolioID string) ([]*a.Account, error)

GetAllMetadataAccounts fetch all Accounts from the repository

func (*UseCase) GetAllMetadataInstruments

func (uc *UseCase) GetAllMetadataInstruments(ctx context.Context, key, value, organizationID, ledgerID string) ([]*i.Instrument, error)

GetAllMetadataInstruments fetch all Instruments from the repository

func (*UseCase) GetAllMetadataLedgers

func (uc *UseCase) GetAllMetadataLedgers(ctx context.Context, key, value, organizationID string) ([]*l.Ledger, error)

GetAllMetadataLedgers fetch all Ledgers from the repository

func (*UseCase) GetAllMetadataOrganizations

func (uc *UseCase) GetAllMetadataOrganizations(ctx context.Context, key string, value string) ([]*o.Organization, error)

GetAllMetadataOrganizations fetch all Organizations from the repository

func (*UseCase) GetAllMetadataPortfolios

func (uc *UseCase) GetAllMetadataPortfolios(ctx context.Context, key, value, organizationID, ledgerID string) ([]*p.Portfolio, error)

GetAllMetadataPortfolios fetch all Portfolios from the repository

func (*UseCase) GetAllMetadataProducts

func (uc *UseCase) GetAllMetadataProducts(ctx context.Context, key, value, organizationID, ledgerID string) ([]*r.Product, error)

GetAllMetadataProducts fetch all Products from the repository

func (*UseCase) GetAllOrganizations

func (uc *UseCase) GetAllOrganizations(ctx context.Context) ([]*o.Organization, error)

GetAllOrganizations fetch all Organizations from the repository

func (*UseCase) GetAllPortfolio

func (uc *UseCase) GetAllPortfolio(ctx context.Context, organizationID, ledgerID string) ([]*p.Portfolio, error)

GetAllPortfolio fetch all Portfolio from the repository

func (*UseCase) GetAllProducts

func (uc *UseCase) GetAllProducts(ctx context.Context, organizationID, ledgerID string) ([]*r.Product, error)

GetAllProducts fetch all Product from the repository

func (*UseCase) GetInstrumentByID

func (uc *UseCase) GetInstrumentByID(ctx context.Context, organizationID, ledgerID, id string) (*i.Instrument, error)

GetInstrumentByID get an Instrument from the repository by given id.

func (*UseCase) GetLedgerByID

func (uc *UseCase) GetLedgerByID(ctx context.Context, organizationID, id string) (*l.Ledger, error)

GetLedgerByID Get a ledger from the repository by given id.

func (*UseCase) GetOrganizationByID

func (uc *UseCase) GetOrganizationByID(ctx context.Context, id string) (*o.Organization, error)

GetOrganizationByID fetch a new organization from the repository

func (*UseCase) GetPortfolioByID

func (uc *UseCase) GetPortfolioByID(ctx context.Context, organizationID, ledgerID, id string) (*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 string) (*r.Product, error)

GetProductByID get a Product from the repository by given id.

Jump to

Keyboard shortcuts

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