logic

package
v0.0.0-...-6c9d739 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2021 License: OSL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logic

type Logic interface {
	// Initialize module
	Init(configFilePath string) error

	// Account module
	CreateAccount(input *entity.CreateAccountInput) (*entity.CreateAccountOutput, error)
	ImportAccount(input *entity.ImportAccountInput) (*entity.ImportAccountOutput, error)
	ExportAccount(input *entity.ExportAccountInput) (*entity.ExportAccountOutput, error)
	ListAccount() ([]*entity.Account, error)
	SetDefaultAccount(input *entity.SetDefaultAccountInput) (*entity.SetDefaultAccountOutput, error)

	// Credit module
	SetupCredit(input *entity.SetupCreditInput) (*entity.SetupCreditOutput, error)
	MintCreditByCollateral(input *entity.MintCreditByCollateralInput) (*entity.MintCreditByCollateralOutput, error)
	MintCreditByCredit(input *entity.MintCreditByCreditInput) (*entity.MintCreditByCreditOutput, error)
	RedeemCredit(input *entity.RedeemCreditInput) (*entity.RedeemCreditOutput, error)
	GetCreditExchange(input *entity.GetCreditExchangeInput) (*entity.GetCreditExchangeOutput, error)

	// Collateral
	CollateralHealthCheck(input *entity.CollateralHealthCheckInput) ([]*entity.CollateralHealthCheckOutput, error)
	RebalanceCollateral(input *entity.RebalanceCollateralInput) ([]*entity.RebalanceCollateralOutput, error)

	// Environment module
	SetEnv(input *entity.SetEnvInput) error
}

func NewLogic

func NewLogic(db database.Repository, config config.Configuration, vFactory vfactory.Repository) Logic

Jump to

Keyboard shortcuts

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