Documentation
¶
Index ¶
- func DeleteKeyCmd(ctx context.Context, store appconfig.ConfigStore, key string) tea.Cmd
- func DispatchHeadlessEnvOutput(w io.Writer, envs []devconfig.EnvironmentInfo, err error)
- func DispatchHeadlessKeyOutput(w io.Writer, storeName string, entries []appconfig.ConfigEntry, ...)
- func DispatchHeadlessStoreOutput(w io.Writer, stores []appconfig.StoreInfo, err error)
- func LoadEnvsCmd(appDir string) tea.Cmd
- func LoadKeysCmd(ctx context.Context, store appconfig.ConfigStore) tea.Cmd
- func LoadStoresCmd(bp *schema.Blueprint) tea.Cmd
- func SetKeyCmd(ctx context.Context, store appconfig.ConfigStore, key, value string, ...) tea.Cmd
- type ConfigOutput
- func (o *ConfigOutput) PrintEntryTable(entries []appconfig.ConfigEntry, showSecrets bool)
- func (o *ConfigOutput) PrintError(message string, err error)
- func (o *ConfigOutput) PrintInfo(message string)
- func (o *ConfigOutput) PrintStoreList(stores []appconfig.StoreInfo)
- func (o *ConfigOutput) PrintSuccess(message string)
- func (o *ConfigOutput) PrintTable(headers []string, rows [][]string)
- func (o *ConfigOutput) PrintWarning(message string)
- type EnvSelectModel
- type EnvSelectedMsg
- type EnvsLoadErrorMsg
- type EnvsLoadedMsg
- type KeyDeletedMsg
- type KeySetMsg
- type KeyTableModel
- type KeysLoadErrorMsg
- type KeysLoadedMsg
- type ListModel
- type ListModelOptions
- type MainModel
- type MainModelOptions
- type OperationErrorMsg
- type StoreSelectModel
- type StoreSelectedMsg
- type StoresLoadErrorMsg
- type StoresLoadedMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteKeyCmd ¶
DeleteKeyCmd deletes a key from a config store.
func DispatchHeadlessEnvOutput ¶
func DispatchHeadlessEnvOutput( w io.Writer, envs []devconfig.EnvironmentInfo, err error, )
DispatchHeadlessEnvOutput writes the environment list to a writer.
func DispatchHeadlessKeyOutput ¶
func DispatchHeadlessKeyOutput( w io.Writer, storeName string, entries []appconfig.ConfigEntry, showSecrets bool, err error, )
DispatchHeadlessKeyOutput writes key entries to a writer.
func DispatchHeadlessStoreOutput ¶
DispatchHeadlessStoreOutput writes the store list to a writer.
func LoadEnvsCmd ¶
LoadEnvsCmd discovers available environments from deploy config files.
func LoadKeysCmd ¶
LoadKeysCmd lists all entries from a config store.
func LoadStoresCmd ¶
LoadStoresCmd extracts config stores from a loaded blueprint.
Types ¶
type ConfigOutput ¶
type ConfigOutput struct {
// contains filtered or unexported fields
}
ConfigOutput handles formatted stdout for config commands.
func NewConfigOutput ¶
func NewConfigOutput(writer io.Writer, isColor bool) *ConfigOutput
NewConfigOutput creates a new ConfigOutput writer.
func (*ConfigOutput) PrintEntryTable ¶
func (o *ConfigOutput) PrintEntryTable( entries []appconfig.ConfigEntry, showSecrets bool, )
PrintEntryTable prints a table of config entries.
func (*ConfigOutput) PrintError ¶
func (o *ConfigOutput) PrintError(message string, err error)
PrintError prints a failed step with a red X and error detail.
func (*ConfigOutput) PrintInfo ¶
func (o *ConfigOutput) PrintInfo(message string)
PrintInfo prints an informational message.
func (*ConfigOutput) PrintStoreList ¶
func (o *ConfigOutput) PrintStoreList(stores []appconfig.StoreInfo)
PrintStoreList prints a summary table of config stores.
func (*ConfigOutput) PrintSuccess ¶
func (o *ConfigOutput) PrintSuccess(message string)
PrintSuccess prints a completed step with a green checkmark.
func (*ConfigOutput) PrintTable ¶
func (o *ConfigOutput) PrintTable(headers []string, rows [][]string)
PrintTable prints a formatted table with headers and rows.
func (*ConfigOutput) PrintWarning ¶
func (o *ConfigOutput) PrintWarning(message string)
PrintWarning prints a warning message.
type EnvSelectModel ¶
type EnvSelectModel struct {
// contains filtered or unexported fields
}
EnvSelectModel presents a selectable list of discovered environments.
func NewEnvSelectModel ¶
func NewEnvSelectModel( envs []devconfig.EnvironmentInfo, s *styles.Styles, ) EnvSelectModel
NewEnvSelectModel creates a new environment selection model.
type EnvSelectedMsg ¶
type EnvSelectedMsg struct {
Env devconfig.EnvironmentInfo
}
EnvSelectedMsg is sent when the user selects an environment.
type EnvsLoadErrorMsg ¶
type EnvsLoadErrorMsg struct {
Err error
}
EnvsLoadErrorMsg is sent when environment discovery fails.
type EnvsLoadedMsg ¶
type EnvsLoadedMsg struct {
Envs []devconfig.EnvironmentInfo
}
EnvsLoadedMsg is sent when environments have been discovered.
type KeyDeletedMsg ¶
type KeyDeletedMsg struct {
Key string
}
KeyDeletedMsg is sent after a key has been deleted successfully.
type KeySetMsg ¶
type KeySetMsg struct {
Key string
}
KeySetMsg is sent after a key has been set successfully.
type KeyTableModel ¶
type KeyTableModel struct {
// contains filtered or unexported fields
}
KeyTableModel displays and manages config entries with inline editing.
func NewKeyTableModel ¶
func NewKeyTableModel( ctx context.Context, entries []appconfig.ConfigEntry, store appconfig.ConfigStore, storeName string, s *styles.Styles, ) KeyTableModel
NewKeyTableModel creates a new key table model.
type KeysLoadErrorMsg ¶
type KeysLoadErrorMsg struct {
Err error
}
KeysLoadErrorMsg is sent when key loading fails.
type KeysLoadedMsg ¶
type KeysLoadedMsg struct {
Entries []appconfig.ConfigEntry
}
KeysLoadedMsg is sent when keys are loaded from the config store.
type ListModel ¶
type ListModel struct {
Error error
// contains filtered or unexported fields
}
ListModel is a standalone model for `config list` (no store argument). It shows available stores and allows selection for key browsing.
func NewListModel ¶
func NewListModel(opts ListModelOptions) ListModel
NewListModel creates a new list model for browsing stores.
type ListModelOptions ¶
type ListModelOptions struct {
Stores []appconfig.StoreInfo
Styles *styles.Styles
Headless bool
HeadlessWriter io.Writer
}
ListModelOptions configures the standalone list model.
type MainModel ¶
type MainModel struct {
Error error
// contains filtered or unexported fields
}
MainModel is the top-level bubbletea model for the interactive config session.
func NewMainModel ¶
func NewMainModel(opts MainModelOptions) MainModel
NewMainModel creates a new interactive config session model.
type MainModelOptions ¶
type MainModelOptions struct {
// Context is bound to the store operations the session performs so they are
// cancelled when the command context is cancelled (e.g. on Ctrl+C).
Context context.Context
AppDir string
BlueprintFile string
Styles *styles.Styles
Headless bool
HeadlessWriter io.Writer
// StoreFactory allows injecting a mock ConfigStore for testing.
// When nil, the real provider factory is used.
StoreFactory func(ctx context.Context, target string, info appconfig.StoreInfo, opts appconfig.ProviderOpts) (appconfig.ConfigStore, error)
}
MainModelOptions configures the interactive config TUI session.
type OperationErrorMsg ¶
type OperationErrorMsg struct {
Err error
}
OperationErrorMsg is sent when a config operation fails.
type StoreSelectModel ¶
type StoreSelectModel struct {
// contains filtered or unexported fields
}
StoreSelectModel presents a selectable list of config stores.
func NewStoreSelectModel ¶
func NewStoreSelectModel( stores []appconfig.StoreInfo, s *styles.Styles, ) StoreSelectModel
NewStoreSelectModel creates a new store selection model.
type StoreSelectedMsg ¶
StoreSelectedMsg is sent when the user selects a store.
type StoresLoadErrorMsg ¶
type StoresLoadErrorMsg struct {
Err error
}
StoresLoadErrorMsg is sent when store extraction fails.
type StoresLoadedMsg ¶
StoresLoadedMsg is sent when stores have been extracted from the blueprint.