cli

package
v3.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: AGPL-3.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute() error

Execute adds all child commands to the root command and sets flags appropriately.

func ProvideConfig

func ProvideConfig() config.Config

ProvideConfig converts the CLIConfig to an application Config.

Types

type CLIConfig

type CLIConfig struct {
	config.Config
	Verbose bool
}

CLIConfig wraps the application config with CLI-specific settings.

func GetConfig

func GetConfig() *CLIConfig

GetConfig returns the global CLI configuration.

func LoadCLIConfig

func LoadCLIConfig() *CLIConfig

LoadCLIConfig creates a CLIConfig from environment and defaults.

func (*CLIConfig) UpdateFromFlags

func (c *CLIConfig) UpdateFromFlags(databaseDSN string, verbose bool)

UpdateFromFlags applies CLI flag overrides to the configuration.

type Dependencies

type Dependencies struct {
	ResourceTypeService application.ResourceTypeService
	ResourceService     application.ResourceService
	App                 *fx.App
}

Dependencies holds all the dependencies needed by CLI commands.

func StartContainer

func StartContainer(cliCfg *CLIConfig) (*Dependencies, error)

StartContainer starts the Fx container and returns dependencies.

func StartContainerWithDSN

func StartContainerWithDSN(dsn string) (*Dependencies, error)

StartContainerWithDSN starts the Fx container with the given database DSN. Useful for E2E in-process testing so tests run in the same process.

func (*Dependencies) Shutdown

func (d *Dependencies) Shutdown() error

Shutdown gracefully shuts down the Fx container.

Jump to

Keyboard shortcuts

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