Documentation
¶
Index ¶
- Constants
- func FormatHistoryEntry(entry replEntry) string
- func New(svc sdk.Service) sdk.Plugin
- type Plugin
- func (p *Plugin) Activate() tea.Cmd
- func (p *Plugin) BinaryPath() string
- func (p *Plugin) CapturesKeys() bool
- func (p *Plugin) Configure(cfg map[string]interface{}) error
- func (p *Plugin) Description() string
- func (p *Plugin) Dir() string
- func (p *Plugin) ErrMsg() string
- func (p *Plugin) Evaluate(expr string) tea.Cmd
- func (p *Plugin) HandleChdirChanged(evt sdk.ChdirChangedEvent) tea.Cmd
- func (p *Plugin) Hints() []sdk.KeyHint
- func (p *Plugin) History() []replEntry
- func (p *Plugin) HistoryEntry(i int) (expr, result, errStr string)
- func (p *Plugin) HistoryIdx() int
- func (p *Plugin) HistoryLen() int
- func (p *Plugin) ID() string
- func (p *Plugin) Init(ctx *sdk.Context) tea.Cmd
- func (p *Plugin) Input() string
- func (p *Plugin) Name() string
- func (p *Plugin) PastInputs() []string
- func (p *Plugin) Ready() bool
- func (p *Plugin) SetBinaryPath(path string)
- func (p *Plugin) Status() sdk.Status
- func (p *Plugin) Update(msg tea.Msg) (sdk.Plugin, tea.Cmd)
- func (p *Plugin) View(width, height int) string
- type ReplResultMsg
Constants ¶
View Source
const StatusEvaluating = sdk.Status(10)
Variables ¶
This section is empty.
Functions ¶
func FormatHistoryEntry ¶
func FormatHistoryEntry(entry replEntry) string
FormatHistoryEntry formats a single history entry for display (exported for tests).
Types ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin implements the terraform console REPL feature.
func (*Plugin) BinaryPath ¶
func (*Plugin) CapturesKeys ¶
CapturesKeys implements sdk.KeyCapturer.
func (*Plugin) Description ¶
func (*Plugin) HandleChdirChanged ¶
func (p *Plugin) HandleChdirChanged(evt sdk.ChdirChangedEvent) tea.Cmd
HandleChdirChanged implements sdk.ChdirHandler.
func (*Plugin) HistoryEntry ¶
HistoryEntry returns the entry at the given index for testing.
func (*Plugin) HistoryIdx ¶
func (*Plugin) HistoryLen ¶
HistoryLen returns the number of history entries.
func (*Plugin) PastInputs ¶
func (*Plugin) SetBinaryPath ¶
SetBinaryPath allows tests to override the binary path.
type ReplResultMsg ¶
ReplResultMsg is sent when an expression evaluation completes.
Click to show internal directories.
Click to hide internal directories.