terminal

package
v0.412.6 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsANSITerminal

func IsANSITerminal(ctx context.Context) bool

func LaunchEmbeddedConsole

func LaunchEmbeddedConsole(ctx context.Context, k *kong.Kong, binder KongContextBinder, eventSource schemaeventsource.EventSource)

func Predictors

func Predictors(view schemaeventsource.View) map[string]complete.Predictor

func PrintJSON

func PrintJSON(ctx context.Context, json []byte)

PrintJSON prints a json string to the terminal It probably doesn't belong here, but it will be moved later with the interactive terminal work

func RunInteractiveConsole

func RunInteractiveConsole(ctx context.Context, k *kong.Kong, binder KongContextBinder, eventSource schemaeventsource.EventSource) error

func UpdateModuleState

func UpdateModuleState(ctx context.Context, module string, state BuildState)

Types

type BuildState

type BuildState string
const BuildStateBuilding BuildState = "Building"
const BuildStateBuilt BuildState = "Built"
const BuildStateDeployed BuildState = "Deployed"
const BuildStateDeploying BuildState = "Deploying"
const BuildStateFailed BuildState = "Failed"
const BuildStateTerminated BuildState = "Terminated"
const BuildStateWaiting BuildState = "Waiting"

type ExitListener

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

func (ExitListener) OnChange

func (e ExitListener) OnChange(line []rune, pos int, key rune) (newLine []rune, newPos int, ok bool)

type FTLCompletion

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

func (*FTLCompletion) Do

func (f *FTLCompletion) Do(line []rune, pos int) ([][]rune, int)

type KongContextBinder

type KongContextBinder func(ctx context.Context, kctx *kong.Context) context.Context

type StatusLine

type StatusLine interface {
	SetMessage(message string)
	Close()
}

type StatusManager

type StatusManager interface {
	Close()
	NewStatus(message string) StatusLine
	IntoContext(ctx context.Context) context.Context
	SetModuleState(module string, state BuildState)
}

func FromContext

func FromContext(ctx context.Context) StatusManager

func NewStatusManager

func NewStatusManager(ctx context.Context) StatusManager

Jump to

Keyboard shortcuts

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