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 ¶
ProvideConfig converts the CLIConfig to an application Config.
func RegisterEchoConfigurer ¶
func RegisterEchoConfigurer(c EchoConfigurer)
RegisterEchoConfigurer appends an Echo configurer. Must be called before Execute(). Reachable from downstream binaries via the public re-export in pkg/cli.
func RegisterFxOptions ¶
RegisterFxOptions appends fx options to be merged into the serve command's fx graph. Must be called before Execute(). Reachable from downstream binaries via the public re-export in pkg/cli.
Types ¶
type CLIConfig ¶
CLIConfig wraps the application config with CLI-specific settings.
func LoadCLIConfig ¶
func LoadCLIConfig() *CLIConfig
LoadCLIConfig creates a CLIConfig from environment and defaults.
func (*CLIConfig) UpdateFromFlags ¶
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.
type EchoConfigurer ¶
EchoConfigurer customizes the serve command's *echo.Echo after the core and preset routes are wired but before the dynamic /:typeSlug catch-all.