Documentation
¶
Overview ¶
Package v1 implements the command-line interface for fxconfig. It provides commands for namespace management and configuration handling.
Index ¶
- func NewInfoCommand(ctx *CLIContext) *cobra.Command
- func NewNsRootCommand(ctx *CLIContext) *cobra.Command
- func NewRootCommand(cliCtx *CLIContext, buildApp func(cfg *config.Config) (app.Application, error)) *cobra.Command
- func NewTxRootCommand(ctx *CLIContext) *cobra.Command
- func NewVersionCommand() *cobra.Command
- type CLIContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInfoCommand ¶
func NewInfoCommand(ctx *CLIContext) *cobra.Command
NewInfoCommand returns a command that displays the effective configuration. The configuration is shown in the requested format (yaml or env) after applying all overrides from flags, environment variables, and config files.
func NewNsRootCommand ¶
func NewNsRootCommand(ctx *CLIContext) *cobra.Command
NewNsRootCommand returns the namespace command group. This command provides subcommands for namespace lifecycle operations: create, update, and list.
func NewRootCommand ¶
func NewRootCommand(cliCtx *CLIContext, buildApp func(cfg *config.Config) (app.Application, error)) *cobra.Command
NewRootCommand constructs and returns the root command for fxconfig. It sets up configuration loading, flag registration, and all subcommands. Configuration is loaded in PersistentPreRunE.
func NewTxRootCommand ¶
func NewTxRootCommand(ctx *CLIContext) *cobra.Command
NewTxRootCommand returns the namespace command group. This command provides subcommands for transaction operations: endorse, merge, and submit.
func NewVersionCommand ¶
NewVersionCommand returns a command that displays version information. It shows the fxconfig version, Go version, commit SHA, and OS/architecture.
Types ¶
type CLIContext ¶
type CLIContext struct {
Config *config.Config
Printer cliio.Printer
IOTransactionCodec cliio.Codec
App app.Application
}
CLIContext holds shared dependencies for CLI commands. It provides access to configuration, output formatting, transaction encoding, and the application layer for executing operations.