Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ComposerFactory ¶
ComposerFactory creates a runner.Composer for the given project directory.
type ConfigProvider ¶
type ConfigProvider interface {
ConfigFile(ctx context.Context) ([]byte, error)
ConfigResolved(ctx context.Context) ([]byte, error)
EditCommand(ctx context.Context) (*exec.Cmd, error)
ValidateConfig(ctx context.Context) error
}
ConfigProvider provides access to docker-compose configuration files. Defined in the tui package (not runner) because it returns *exec.Cmd and is TUI-only. Both Compose and RemoteCompose implement it.
type ConnectCallback ¶
type ConnectCallback func(server config.Server) (connectCmd *exec.Cmd, factory ComposerFactory, loader ProjectLoader, disconnect func() error)
ConnectCallback is called when a remote server is selected. It returns the SSH connect command (for tea.ExecProcess), a ComposerFactory, a ProjectLoader, and a disconnect function.
type ExecProvider ¶
type ExecProvider interface {
ExecCommand(ctx context.Context, service string, command []string) (*exec.Cmd, error)
}
ExecProvider provides interactive exec into a container. Defined in the tui package (like ConfigProvider) because it returns *exec.Cmd and is TUI/CLI-only — not a pipeline operation. Both Compose and RemoteCompose implement it.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the Bubble Tea model for the cdeploy TUI.
type Option ¶
type Option func(*Model)
NewModel creates a new TUI model.
Decision table for starting screen:
servers!=nil -> screenSelectServer (always show picker) servers=nil + composer=nil -> screenSelectProject servers=nil + composer!=nil -> screenSelectContainers
Option configures optional Model behavior.
func WithConfig ¶
WithConfig sets the live Config used by the settings editor for CRUD operations.
func WithConfigPath ¶
WithConfigPath sets the file path used by the settings editor to save config changes.
func WithLocalProjectLoader ¶
func WithLocalProjectLoader(loader ProjectLoader) Option
WithLocalProjectLoader sets the project loader used for local project discovery. This replaces the default compose.ListProjects fallback with a loader that respects standalone docker-compose detection.
func WithPreselectedServer ¶
WithPreselectedServer makes the TUI skip the server picker and auto-connect to the server at the given index. The index refers to the servers slice passed to NewModel.