Documentation
¶
Overview ¶
Package commands provides modular CLI command packages for domain CLIs.
There are two ways to use commands from this package:
1. Via the Commands factory (recommended for most use cases):
commands := commands.New(lggr)
app.AddCommand(
commands.State(domain, stateConfig),
commands.EVM(domain),
commands.JD(domain),
)
2. Via direct package imports (for advanced DI/testing):
import "github.com/smartcontractkit/chainlink-deployments-framework/pkg/commands/state"
app.AddCommand(state.NewCommand(state.Config{
Logger: lggr,
Domain: domain,
ViewState: myViewState,
Deps: &state.Deps{...}, // inject mocks for testing
}))
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Commands ¶
type Commands struct {
// contains filtered or unexported fields
}
Commands provides a factory for creating CLI commands with shared configuration. This allows setting the logger once and reusing it across all commands.
type StateConfig ¶
type StateConfig struct {
// ViewState is the function that generates state from an environment.
// This is domain-specific and must be provided by the user.
ViewState state.ViewStateFunc
}
StateConfig holds configuration for state commands.
Click to show internal directories.
Click to hide internal directories.