v1

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package v1 implements the command-line interface for fxconfig. It provides commands for namespace management and configuration handling.

Index

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

func NewVersionCommand() *cobra.Command

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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