Documentation
¶
Index ¶
- func New(svc sdk.Service) sdk.Plugin
- type Input
- type Plugin
- func (p *Plugin) Activate(input Input) tea.Cmd
- func (p *Plugin) Cancel()
- func (p *Plugin) Configure(cfg map[string]interface{}) error
- func (p *Plugin) Hints() []sdk.KeyHint
- func (p *Plugin) Init(deps *sdk.PluginDeps) tea.Cmd
- func (p *Plugin) Ready() bool
- func (p *Plugin) Stdout() ([]byte, error)
- func (p *Plugin) Update(msg tea.Msg) (sdk.Plugin, tea.Cmd)
- func (p *Plugin) View(width, height int) string
- type VersionResultMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Input ¶ added in v1.12.0
type Input struct {
// JSON signals the caller wants JSON-shaped stdout. Plugin.Stdout reads
// this directly from p.input.JSON when rendering the version payload.
JSON bool
}
Input is the typed DTO carrying parsed CLI flags into the version plugin's lifecycle. cmd/tfui/version_command.go binds the root-persistent --json value into Input.JSON at RunE time and hands the value to Plugin.Activate.
type Plugin ¶
type Plugin struct {
sdk.PluginBase
// contains filtered or unexported fields
}
Plugin implements the version info viewer.
func (*Plugin) Init ¶
func (p *Plugin) Init(deps *sdk.PluginDeps) tea.Cmd
Init wires the plugin to its shared dependencies.
func (*Plugin) Stdout ¶ added in v1.12.0
Stdout produces stdout content for standalone/CI mode.
JSON mode is a passthrough: returns the raw `terraform version -json` bytes captured during the version fetch. The schema is terraform's, not tfui's. Human-readable mode renders tfui + terraform version info.
type VersionResultMsg ¶
type VersionResultMsg struct {
Info *sdk.VersionInfo
Err error
}
VersionResultMsg is sent when the version fetch completes.
Click to show internal directories.
Click to hide internal directories.