Documentation ¶
Index ¶
- type UseCase
- func (uc *UseCase) GetAccountByID(ctx context.Context, organizationID, ledgerID, portfolioID, id string) (*a.Account, error)
- func (uc *UseCase) GetAllAccount(ctx context.Context, organizationID, ledgerID, portfolioID string, ...) ([]*a.Account, error)
- func (uc *UseCase) GetAllInstruments(ctx context.Context, organizationID, ledgerID string, ...) ([]*i.Instrument, error)
- func (uc *UseCase) GetAllLedgers(ctx context.Context, organizationID string, filter common.QueryHeader) ([]*l.Ledger, error)
- func (uc *UseCase) GetAllMetadataAccounts(ctx context.Context, organizationID, ledgerID, portfolioID string, ...) ([]*a.Account, error)
- func (uc *UseCase) GetAllMetadataInstruments(ctx context.Context, organizationID, ledgerID string, ...) ([]*i.Instrument, error)
- func (uc *UseCase) GetAllMetadataLedgers(ctx context.Context, organizationID string, filter common.QueryHeader) ([]*l.Ledger, error)
- func (uc *UseCase) GetAllMetadataOrganizations(ctx context.Context, filter common.QueryHeader) ([]*o.Organization, error)
- func (uc *UseCase) GetAllMetadataPortfolios(ctx context.Context, organizationID, ledgerID string, ...) ([]*p.Portfolio, error)
- func (uc *UseCase) GetAllMetadataProducts(ctx context.Context, organizationID, ledgerID string, ...) ([]*r.Product, error)
- func (uc *UseCase) GetAllOrganizations(ctx context.Context, filter common.QueryHeader) ([]*o.Organization, error)
- func (uc *UseCase) GetAllPortfolio(ctx context.Context, organizationID, ledgerID string, ...) ([]*p.Portfolio, error)
- func (uc *UseCase) GetAllProducts(ctx context.Context, organizationID, ledgerID string, ...) ([]*r.Product, error)
- func (uc *UseCase) GetInstrumentByID(ctx context.Context, organizationID, ledgerID, id string) (*i.Instrument, error)
- func (uc *UseCase) GetLedgerByID(ctx context.Context, organizationID, id string) (*l.Ledger, error)
- func (uc *UseCase) GetOrganizationByID(ctx context.Context, id string) (*o.Organization, error)
- func (uc *UseCase) GetPortfolioByID(ctx context.Context, organizationID, ledgerID, id string) (*p.Portfolio, error)
- func (uc *UseCase) GetProductByID(ctx context.Context, organizationID, ledgerID, id string) (*r.Product, 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 // 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, filter common.QueryHeader) ([]*a.Account, error)
GetAllAccount fetch all Account from the repository
func (*UseCase) GetAllInstruments ¶
func (uc *UseCase) GetAllInstruments(ctx context.Context, organizationID, ledgerID string, filter common.QueryHeader) ([]*i.Instrument, error)
GetAllInstruments fetch all Instrument from the repository
func (*UseCase) GetAllLedgers ¶
func (uc *UseCase) GetAllLedgers(ctx context.Context, organizationID string, filter common.QueryHeader) ([]*l.Ledger, error)
GetAllLedgers fetch all Ledgers from the repository
func (*UseCase) GetAllMetadataAccounts ¶
func (uc *UseCase) GetAllMetadataAccounts(ctx context.Context, organizationID, ledgerID, portfolioID string, filter common.QueryHeader) ([]*a.Account, error)
GetAllMetadataAccounts fetch all Accounts from the repository
func (*UseCase) GetAllMetadataInstruments ¶
func (uc *UseCase) GetAllMetadataInstruments(ctx context.Context, organizationID, ledgerID string, filter common.QueryHeader) ([]*i.Instrument, error)
GetAllMetadataInstruments fetch all Instruments from the repository
func (*UseCase) GetAllMetadataLedgers ¶
func (uc *UseCase) GetAllMetadataLedgers(ctx context.Context, organizationID string, filter common.QueryHeader) ([]*l.Ledger, error)
GetAllMetadataLedgers fetch all Ledgers from the repository
func (*UseCase) GetAllMetadataOrganizations ¶
func (uc *UseCase) GetAllMetadataOrganizations(ctx context.Context, filter common.QueryHeader) ([]*o.Organization, error)
GetAllMetadataOrganizations fetch all Organizations from the repository
func (*UseCase) GetAllMetadataPortfolios ¶
func (uc *UseCase) GetAllMetadataPortfolios(ctx context.Context, organizationID, ledgerID string, filter common.QueryHeader) ([]*p.Portfolio, error)
GetAllMetadataPortfolios fetch all Portfolios from the repository
func (*UseCase) GetAllMetadataProducts ¶
func (uc *UseCase) GetAllMetadataProducts(ctx context.Context, organizationID, ledgerID string, filter common.QueryHeader) ([]*r.Product, error)
GetAllMetadataProducts fetch all Products from the repository
func (*UseCase) GetAllOrganizations ¶
func (uc *UseCase) GetAllOrganizations(ctx context.Context, filter common.QueryHeader) ([]*o.Organization, error)
GetAllOrganizations fetch all Organizations from the repository
func (*UseCase) GetAllPortfolio ¶
func (uc *UseCase) GetAllPortfolio(ctx context.Context, organizationID, ledgerID string, filter common.QueryHeader) ([]*p.Portfolio, error)
GetAllPortfolio fetch all Portfolio from the repository
func (*UseCase) GetAllProducts ¶
func (uc *UseCase) GetAllProducts(ctx context.Context, organizationID, ledgerID string, filter common.QueryHeader) ([]*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 ¶
GetLedgerByID Get a ledger from the repository by given id.
func (*UseCase) GetOrganizationByID ¶
GetOrganizationByID fetch a new organization from the repository
Source Files ¶
- get-all-accounts.go
- get-all-instruments.go
- get-all-ledgers.go
- get-all-metadata-accounts.go
- get-all-metadata-instruments.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.go
- get-id-instrument.go
- get-id-ledger.go
- get-id-organization.go
- get-id-portfolio.go
- get-id-product.go
- query.go