ui

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInteractive

func IsInteractive() bool

func Run

func Run(parentCtx context.Context, runOpts RunOptions) error

func RunLogin

func RunLogin(parentCtx context.Context, version string, platformClient api.PlatformAPI, authToken string, forceFileKeyring bool, webAppURL string, logger log.Logger) error

func RunLogout added in v0.2.0

func RunLogout(parentCtx context.Context, rt runtime.Runtime, platformClient api.PlatformAPI, authToken string, forceFileKeyring bool, containers []config.ContainerConfig, logger log.Logger) error

func RunLogs added in v0.5.2

func RunLogs(parentCtx context.Context, rt runtime.Runtime, containers []config.ContainerConfig, follow bool, tail string, verbose bool) error

func RunMessage added in v0.8.0

func RunMessage(parentCtx context.Context, event output.MessageEvent) error

func RunReset added in v0.9.0

func RunReset(parentCtx context.Context, rt runtime.Runtime, containers []config.ContainerConfig, resetter reset.StateResetter, host string, force bool) error

func RunRestart added in v0.5.8

func RunRestart(parentCtx context.Context, rt runtime.Runtime, stopOpts container.StopOptions, startOpts container.StartOptions) error

func RunSetupAWS added in v0.16.0

func RunSetupAWS(parentCtx context.Context, containers []config.ContainerConfig, localStackHost string, force bool) error

RunSetupAWS runs the AWS profile setup flow with TUI output. It resolves the host from the AWS container config and runs the setup. When force is true, the confirmation prompt is skipped.

func RunSetupAzure added in v0.11.0

func RunSetupAzure(parentCtx context.Context, containers []config.ContainerConfig, localStackHost, lstkConfigDir string) error

RunSetupAzure runs the Azure CLI setup flow with TUI output. The setup itself (endpoint resolution, custom cloud registration, dummy login) lives in azureconfig.RunSetup so non-interactive mode can reuse it.

func RunSnapshotList added in v0.12.0

func RunSnapshotList(parentCtx context.Context, lister snapshot.CloudPodLister, authToken, creator string) error

func RunSnapshotListRemoteS3 added in v0.15.0

func RunSnapshotListRemoteS3(parentCtx context.Context, rt runtime.Runtime, containers []config.ContainerConfig, client snapshot.RemoteClient, host, s3URL string, creds snapshot.S3Credentials, authToken string) error

func RunSnapshotLoad added in v0.10.0

func RunSnapshotLoad(parentCtx context.Context, rt runtime.Runtime, containers []config.ContainerConfig, client SnapshotLoadClient, host string, src snapshot.Destination, authToken, strategy string, starter snapshot.Starter) error

func RunSnapshotLoadRemoteS3 added in v0.15.0

func RunSnapshotLoadRemoteS3(parentCtx context.Context, rt runtime.Runtime, containers []config.ContainerConfig, client snapshot.RemoteClient, host, podName, s3URL string, creds snapshot.S3Credentials, authToken, strategy string, starter snapshot.Starter) error

func RunSnapshotRemove added in v0.12.0

func RunSnapshotRemove(parentCtx context.Context, rt runtime.Runtime, containers []config.ContainerConfig, client snapshot.PodRemover, host, ref, cwd, home, authToken string, force bool) error

func RunSnapshotSave added in v0.8.0

func RunSnapshotSave(parentCtx context.Context, rt runtime.Runtime, containers []config.ContainerConfig, client SnapshotClient, host string, dest snapshot.Destination, authToken string) error

func RunSnapshotSaveRemoteS3 added in v0.15.0

func RunSnapshotSaveRemoteS3(parentCtx context.Context, rt runtime.Runtime, containers []config.ContainerConfig, client snapshot.RemoteClient, host, podName, s3URL string, creds snapshot.S3Credentials, authToken string) error

func RunSnapshotShow added in v0.13.0

func RunSnapshotShow(parentCtx context.Context, inspector snapshot.CloudPodInspector, authToken, podName string) error

func RunStartInterception added in v0.14.0

func RunStartInterception(parentCtx context.Context, preflight func(context.Context, output.Sink) (string, error)) error

RunStartInterception redirects the user's global Azure CLI to LocalStack with TUI output. preflight (the command-boundary checks that resolve the endpoint URL) runs under the TUI sink so its errors render in the TUI too. The domain logic lives in azureconfig so non-interactive mode can reuse it.

func RunStatus added in v0.5.0

func RunStatus(parentCtx context.Context, rt runtime.Runtime, containers []config.ContainerConfig, localStackHost string, clients map[config.EmulatorType]emulator.Client) error

func RunStop added in v0.3.0

func RunStop(parentCtx context.Context, rt runtime.Runtime, containers []config.ContainerConfig, opts container.StopOptions) error

func RunStopInterception added in v0.14.0

func RunStopInterception(parentCtx context.Context, targetCloud string) error

RunStopInterception switches the global Azure CLI cloud back to targetCloud with TUI output.

func RunUpdate added in v0.4.0

func RunUpdate(parentCtx context.Context, checkOnly bool, githubToken string) error

func RunVolumeClear added in v0.5.8

func RunVolumeClear(parentCtx context.Context, containers []config.ContainerConfig) error

Types

type App

type App struct {
	// contains filtered or unexported fields
}

func NewApp

func NewApp(version, emulatorName, configPath string, cancel func(), opts ...AppOption) App

func (App) DeferredOutput added in v0.12.0

func (a App) DeferredOutput() string

func (App) Err

func (a App) Err() error

func (App) Init

func (a App) Init() tea.Cmd

func (App) Update

func (a App) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (App) View

func (a App) View() string

type AppOption added in v0.2.0

type AppOption func(*App)

type RunOptions added in v0.5.7

type RunOptions struct {
	Runtime                runtime.Runtime
	Version                string
	StartOptions           container.StartOptions
	NotifyOptions          update.NotifyOptions
	ConfigPath             string
	EmulatorLabel          string
	NeedsEmulatorSelection bool
	// PostStart, when set, runs after the emulator is freshly started (e.g. to
	// auto-load a configured snapshot). It is skipped when the emulator was
	// already running.
	PostStart func(ctx context.Context, sink output.Sink) error
}

RunOptions groups the parameters for Run. Bundling them keeps the call site readable as the UI entry point grows new concerns.

type SnapshotClient added in v0.9.0

type SnapshotClient interface {
	snapshot.StateExporter
	snapshot.PodSaver
}

SnapshotClient is satisfied by any type that can both export local state and save a remote pod snapshot — aws.Client implements both today.

type SnapshotLoadClient added in v0.10.0

type SnapshotLoadClient interface {
	snapshot.LocalLoadClient
	snapshot.PodLoader
}

SnapshotLoadClient is satisfied by aws.Client.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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