Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Module("commands", fx.Provide( NewRootCommand, NewInitCommand, NewBacktestCommand, NewAnalyzeCommand, NewVersionCommand, NewRunStrategyCommand, NewCommands, ), fx.Invoke(registerCommands), )
Module provides all command-related dependencies
Functions ¶
This section is empty.
Types ¶
type AnalyzeCommandResult ¶
func NewAnalyzeCommand ¶
func NewAnalyzeCommand(handler backtesting.AnalyzeHandler) AnalyzeCommandResult
NewAnalyzeCommand creates the analyze command
type BacktestCommandResult ¶
func NewBacktestCommand ¶
func NewBacktestCommand(handler backtesting.BacktestHandler) BacktestCommandResult
NewBacktestCommand creates the backtest command
type CommandParams ¶
type CommandParams struct {
fx.In
Init *cobra.Command `name:"init"`
//Live *cobra.Command `name:"live"`
Backtest *cobra.Command `name:"backtest"`
Analyze *cobra.Command `name:"analyze"`
Version *cobra.Command `name:"version"`
}
CommandParams uses fx.In to inject named commands
type Commands ¶
type Commands struct {
Init *cobra.Command
//Live *cobra.Command
Backtest *cobra.Command
Analyze *cobra.Command
Version *cobra.Command
}
Commands aggregates all cobra commands
func NewCommands ¶
func NewCommands(params CommandParams) *Commands
NewCommands assembles all commands (created by individual providers)
type InitCommandResult ¶
func NewInitCommand ¶
func NewInitCommand(handler setup.InitHandler) InitCommandResult
NewInitCommand creates the init command
type LiveCommandResult ¶
func NewLiveCommand ¶
func NewLiveCommand(handler live.LiveHandler) LiveCommandResult
NewLiveCommand creates the live command
type RootCommand ¶
RootCommand wraps the root cobra command
func NewRootCommand ¶
func NewRootCommand(handler core.RootHandler) *RootCommand
NewRootCommand creates the root command
type RunStrategyCommand ¶
func NewRunStrategyCommand ¶
func NewRunStrategyCommand(rt live.Runtime) *RunStrategyCommand
type VersionCommandResult ¶
func NewVersionCommand ¶
func NewVersionCommand() VersionCommandResult
NewVersionCommand creates the version command
Click to show internal directories.
Click to hide internal directories.