Documentation ¶
Index ¶
- type UseCase
- func (uc *UseCase) CreateAccount(ctx context.Context, organizationID, ledgerID, portfolioID string, ...) (*a.Account, error)
- func (uc *UseCase) CreateInstrument(ctx context.Context, organizationID, ledgerID uuid.UUID, ...) (*i.Instrument, error)
- func (uc *UseCase) CreateLedger(ctx context.Context, organizationID string, cli *l.CreateLedgerInput) (*l.Ledger, error)
- func (uc *UseCase) CreateOrganization(ctx context.Context, coi *o.CreateOrganizationInput) (*o.Organization, error)
- func (uc *UseCase) CreatePortfolio(ctx context.Context, organizationID, ledgerID string, ...) (*p.Portfolio, error)
- func (uc *UseCase) CreateProduct(ctx context.Context, organizationID, ledgerID string, ...) (*r.Product, error)
- func (uc *UseCase) DeleteAccountByID(ctx context.Context, organizationID, ledgerID, portfolioID, id string) error
- func (uc *UseCase) DeleteInstrumentByID(ctx context.Context, organizationID, ledgerID, id uuid.UUID) error
- func (uc *UseCase) DeleteLedgerByID(ctx context.Context, organizationID, id string) error
- func (uc *UseCase) DeleteOrganizationByID(ctx context.Context, id string) error
- func (uc *UseCase) DeletePortfolioByID(ctx context.Context, organizationID, ledgerID, id string) error
- func (uc *UseCase) DeleteProductByID(ctx context.Context, organizationID, ledgerID, id string) error
- func (uc *UseCase) UpdateAccountByID(ctx context.Context, organizationID, ledgerID, portfolioID, id string, ...) (*a.Account, error)
- func (uc *UseCase) UpdateInstrumentByID(ctx context.Context, organizationID, ledgerID uuid.UUID, id uuid.UUID, ...) (*i.Instrument, error)
- func (uc *UseCase) UpdateLedgerByID(ctx context.Context, organizationID, id string, uli *l.UpdateLedgerInput) (*l.Ledger, error)
- func (uc *UseCase) UpdateOrganizationByID(ctx context.Context, id string, uoi *o.UpdateOrganizationInput) (*o.Organization, error)
- func (uc *UseCase) UpdatePortfolioByID(ctx context.Context, organizationID, ledgerID, id string, ...) (*p.Portfolio, error)
- func (uc *UseCase) UpdateProductByID(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) CreateAccount ¶
func (uc *UseCase) CreateAccount(ctx context.Context, organizationID, ledgerID, portfolioID string, cai *a.CreateAccountInput) (*a.Account, error)
CreateAccount creates a new account persists data in the repository.
func (*UseCase) CreateInstrument ¶
func (uc *UseCase) CreateInstrument(ctx context.Context, organizationID, ledgerID uuid.UUID, cii *i.CreateInstrumentInput) (*i.Instrument, error)
CreateInstrument creates a new instrument persists data in the repository.
func (*UseCase) CreateLedger ¶
func (uc *UseCase) CreateLedger(ctx context.Context, organizationID string, cli *l.CreateLedgerInput) (*l.Ledger, error)
CreateLedger creates a new ledger persists data in the repository.
func (*UseCase) CreateOrganization ¶
func (uc *UseCase) CreateOrganization(ctx context.Context, coi *o.CreateOrganizationInput) (*o.Organization, error)
CreateOrganization creates a new organization persists data in the repository.
func (*UseCase) CreatePortfolio ¶
func (uc *UseCase) CreatePortfolio(ctx context.Context, organizationID, ledgerID string, cpi *p.CreatePortfolioInput) (*p.Portfolio, error)
CreatePortfolio creates a new portfolio persists data in the repository.
func (*UseCase) CreateProduct ¶
func (uc *UseCase) CreateProduct(ctx context.Context, organizationID, ledgerID string, cpi *r.CreateProductInput) (*r.Product, error)
CreateProduct creates a new product persists data in the repository.
func (*UseCase) DeleteAccountByID ¶
func (uc *UseCase) DeleteAccountByID(ctx context.Context, organizationID, ledgerID, portfolioID, id string) error
DeleteAccountByID delete an account from the repository by ids.
func (*UseCase) DeleteInstrumentByID ¶
func (uc *UseCase) DeleteInstrumentByID(ctx context.Context, organizationID, ledgerID, id uuid.UUID) error
DeleteInstrumentByID delete an instrument from the repository by ids.
func (*UseCase) DeleteLedgerByID ¶
DeleteLedgerByID deletes a ledger from the repository
func (*UseCase) DeleteOrganizationByID ¶
DeleteOrganizationByID fetch a new organization from the repository
func (*UseCase) DeletePortfolioByID ¶
func (uc *UseCase) DeletePortfolioByID(ctx context.Context, organizationID, ledgerID, id string) error
DeletePortfolioByID deletes a portfolio from the repository by ids.
func (*UseCase) DeleteProductByID ¶
func (uc *UseCase) DeleteProductByID(ctx context.Context, organizationID, ledgerID, id string) error
DeleteProductByID delete a product from the repository by ids.
func (*UseCase) UpdateAccountByID ¶
func (uc *UseCase) UpdateAccountByID(ctx context.Context, organizationID, ledgerID, portfolioID, id string, uai *a.UpdateAccountInput) (*a.Account, error)
UpdateAccountByID update an account from the repository by given id.
func (*UseCase) UpdateInstrumentByID ¶
func (uc *UseCase) UpdateInstrumentByID(ctx context.Context, organizationID, ledgerID uuid.UUID, id uuid.UUID, uii *i.UpdateInstrumentInput) (*i.Instrument, error)
UpdateInstrumentByID update an instrument from the repository by given id.
func (*UseCase) UpdateLedgerByID ¶
func (uc *UseCase) UpdateLedgerByID(ctx context.Context, organizationID, id string, uli *l.UpdateLedgerInput) (*l.Ledger, error)
UpdateLedgerByID update a ledger from the repository.
func (*UseCase) UpdateOrganizationByID ¶
func (uc *UseCase) UpdateOrganizationByID(ctx context.Context, id string, uoi *o.UpdateOrganizationInput) (*o.Organization, error)
UpdateOrganizationByID update an organization from the repository.
Source Files ¶
- command.go
- create-account.go
- create-instrument.go
- create-ledger.go
- create-organization.go
- create-portfolio.go
- create-product.go
- delete-account.go
- delete-instrument.go
- delete-ledger.go
- delete-organization.go
- delete-portfolio.go
- delete-product.go
- update-account.go
- update-instrument.go
- update-ledger.go
- update-organization.go
- update-portfolio.go
- update-product.go