configui

package
v0.0.0-...-2fd5d2c Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteKeyCmd

func DeleteKeyCmd(ctx context.Context, store appconfig.ConfigStore, key string) tea.Cmd

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

func DispatchHeadlessStoreOutput(
	w io.Writer,
	stores []appconfig.StoreInfo,
	err error,
)

DispatchHeadlessStoreOutput writes the store list to a writer.

func LoadEnvsCmd

func LoadEnvsCmd(appDir string) tea.Cmd

LoadEnvsCmd discovers available environments from deploy config files.

func LoadKeysCmd

func LoadKeysCmd(ctx context.Context, store appconfig.ConfigStore) tea.Cmd

LoadKeysCmd lists all entries from a config store.

func LoadStoresCmd

func LoadStoresCmd(bp *schema.Blueprint) tea.Cmd

LoadStoresCmd extracts config stores from a loaded blueprint.

func SetKeyCmd

func SetKeyCmd(
	ctx context.Context,
	store appconfig.ConfigStore,
	key, value string,
	sensitive bool,
) tea.Cmd

SetKeyCmd sets a key/value in a config store.

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.

func (EnvSelectModel) Init

func (m EnvSelectModel) Init() tea.Cmd

Init implements tea.Model.

func (EnvSelectModel) Update

func (m EnvSelectModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (EnvSelectModel) View

func (m EnvSelectModel) View() string

View implements tea.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.

func (KeyTableModel) Init

func (m KeyTableModel) Init() tea.Cmd

Init implements tea.Model.

func (KeyTableModel) Update

func (m KeyTableModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (KeyTableModel) View

func (m KeyTableModel) View() string

View implements tea.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.

func (ListModel) Init

func (m ListModel) Init() tea.Cmd

Init implements tea.Model.

func (ListModel) Update

func (m ListModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (ListModel) View

func (m ListModel) View() string

View implements tea.Model.

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.

func (MainModel) Init

func (m MainModel) Init() tea.Cmd

Init implements tea.Model.

func (MainModel) Update

func (m MainModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (MainModel) View

func (m MainModel) View() string

View implements tea.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.

func (StoreSelectModel) Init

func (m StoreSelectModel) Init() tea.Cmd

Init implements tea.Model.

func (StoreSelectModel) Update

func (m StoreSelectModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (StoreSelectModel) View

func (m StoreSelectModel) View() string

View implements tea.Model.

type StoreSelectedMsg

type StoreSelectedMsg struct {
	Store appconfig.StoreInfo
}

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

type StoresLoadedMsg struct {
	Stores []appconfig.StoreInfo
}

StoresLoadedMsg is sent when stores have been extracted from the blueprint.

Jump to

Keyboard shortcuts

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