modifiers

package
v0.4.0-beta.47 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandHandler

type CommandHandler func(s string)

type EnvironmentCapture

type EnvironmentCapture struct {
	ExecutionModifier

	Variables []string
	// contains filtered or unexported fields
}

func NewEnvironmentCapture

func NewEnvironmentCapture(variables []string) *EnvironmentCapture

func (*EnvironmentCapture) GetResult

func (m *EnvironmentCapture) GetResult(int) []ModifierResult

func (*EnvironmentCapture) PrepareScripts

func (m *EnvironmentCapture) PrepareScripts(scripts *scripts.ScriptManager)

func (*EnvironmentCapture) ReceiveEvent

func (m *EnvironmentCapture) ReceiveEvent(event bus.Event)

type ExecutionModifier

type ExecutionModifier interface {
	PrepareScripts(scripts *scripts.ScriptManager)
	GetResult(int) []ModifierResult
	GetStdout() []io.Writer
}

type ExecutionModifierList

type ExecutionModifierList []ExecutionModifier

type ExecutionModifiers

type ExecutionModifiers struct {
	ExecutionModifier
	// contains filtered or unexported fields
}

func NewExecutionModifiers

func NewExecutionModifiers() *ExecutionModifiers

func (*ExecutionModifiers) AddModifier

func (m *ExecutionModifiers) AddModifier(modifier ExecutionModifier)

func (*ExecutionModifiers) GetResult

func (m *ExecutionModifiers) GetResult(exitCode int) []ModifierResult

func (*ExecutionModifiers) GetStdout

func (m *ExecutionModifiers) GetStdout() []io.Writer

func (*ExecutionModifiers) HandleOSC

func (m *ExecutionModifiers) HandleOSC(command string)

func (*ExecutionModifiers) PrepareScripts

func (m *ExecutionModifiers) PrepareScripts(scripts *scripts.ScriptManager)

type ModifierResult

type ModifierResult struct {
	Key   string
	Value interface{}
}

type NullModifier

type NullModifier struct {
	ExecutionModifier
}

func (*NullModifier) GetResult

func (m *NullModifier) GetResult(int) []ModifierResult

func (*NullModifier) GetStdout

func (m *NullModifier) GetStdout() []io.Writer

func (*NullModifier) PrepareScripts

func (m *NullModifier) PrepareScripts(scripts *scripts.ScriptManager)

func (*NullModifier) ReceiveEvent

func (m *NullModifier) ReceiveEvent(event bus.Event)

type OSCHandler

type OSCHandler interface {
	HandleOSC(string) bool
}

type Replace

type Replace struct {
	ExecutionModifier
	// contains filtered or unexported fields
}

func NewReplace

func NewReplace(env map[string]string) *Replace

func (*Replace) PrepareScripts

func (m *Replace) PrepareScripts(scripts *scripts.ScriptManager)

type RpcStream

type RpcStream struct {
	ExecutionModifier

	Reader *os.File
	// contains filtered or unexported fields
}

func NewRpcStream

func NewRpcStream(handler CommandHandler) *RpcStream

func (*RpcStream) GetResult

func (m *RpcStream) GetResult(int) []ModifierResult

func (*RpcStream) GetStdout

func (m *RpcStream) GetStdout() []io.Writer

type SpinnerConstant

type SpinnerConstant struct {
	bus.Handler

	ExecutionModifier
	Spinner     SpinnerControl
	SpinnerName string
}

SpinnerFromScript modifier requires the TrackProgress modifier.

func NewSpinnerConstant

func NewSpinnerConstant(name string, spinner SpinnerControl) *SpinnerConstant

func (*SpinnerConstant) GetResult

func (m *SpinnerConstant) GetResult(exitCode int) []ModifierResult

func (*SpinnerConstant) PrepareScripts

func (m *SpinnerConstant) PrepareScripts(scripts *scripts.ScriptManager)

func (*SpinnerConstant) ReceiveEvent

func (m *SpinnerConstant) ReceiveEvent(event bus.Event)

type SpinnerControl

type SpinnerControl interface {
	Active() bool
	Start()
	Stop()
	Success(message string)
	Error(message string)
	Skip()
	SetMessage(message string)
	NewStep(message string)
	HideAndExecute(f func())
	CurrentHeading() string
	StampShadow()
}

type SpinnerFromScript

type SpinnerFromScript struct {
	bus.Handler
	ExecutionModifier
	Spinner                 *SpinnerConstant
	CommentsAsSpinnerTitles bool
	// contains filtered or unexported fields
}

SpinnerFromScript modifier requires the TrackProgress modifier.

func NewSpinnerFromScript

func NewSpinnerFromScript(CommentsAsSpinnerTitles bool, spinner *SpinnerConstant) *SpinnerFromScript

func (*SpinnerFromScript) GetResult

func (m *SpinnerFromScript) GetResult(int) []ModifierResult

func (*SpinnerFromScript) HandleOSC

func (m *SpinnerFromScript) HandleOSC(osc string) bool

func (*SpinnerFromScript) PrepareScripts

func (m *SpinnerFromScript) PrepareScripts(scripts *scripts.ScriptManager)

func (*SpinnerFromScript) ReceiveEvent

func (m *SpinnerFromScript) ReceiveEvent(event bus.Event)

type Stdout

type Stdout struct {
	bus.Handler
	ExecutionModifier
	// contains filtered or unexported fields
}

func NewStdout

func NewStdout() *Stdout

func (*Stdout) GetResult

func (m *Stdout) GetResult(int) []ModifierResult

func (*Stdout) GetStdout

func (m *Stdout) GetStdout() []io.Writer

func (*Stdout) PrepareScripts

func (m *Stdout) PrepareScripts(scripts *scripts.ScriptManager)

type StdoutStream

type StdoutStream struct {
	bus.Handler
	ExecutionModifier

	Reader *os.File
	// contains filtered or unexported fields
}

func NewStdoutStream

func NewStdoutStream() *StdoutStream

func (*StdoutStream) GetResult

func (m *StdoutStream) GetResult(int) []ModifierResult

func (*StdoutStream) GetStdout

func (m *StdoutStream) GetStdout() []io.Writer

type TrackProgress

type TrackProgress struct {
	ExecutionModifier
	// contains filtered or unexported fields
}

func NewTrackProgress

func NewTrackProgress() *TrackProgress

func (*TrackProgress) GetDuration

func (m *TrackProgress) GetDuration() time.Duration

func (*TrackProgress) GetResult

func (m *TrackProgress) GetResult(int) []ModifierResult

func (*TrackProgress) PrepareScripts

func (m *TrackProgress) PrepareScripts(scripts *scripts.ScriptManager)

func (*TrackProgress) ReceiveEvent

func (m *TrackProgress) ReceiveEvent(event bus.Event)

Jump to

Keyboard shortcuts

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