Documentation ¶
Overview ¶
Package task defines commonly used tasks across plugins. Plugins can share these common tasks and use them in their state machines.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Iterate ¶ added in v0.2.0
func Iterate(p *dt.Plugin, label string, opts OptsIterate) []dt.State
Iterate through a set of options allowing the user to select one before continuing.
func ResetIterate ¶ added in v0.2.0
func ResetIterate(p *dt.Plugin, in *dt.Msg)
ResetIterate should be called from within your plugin's SetOnReset function if you use the Iterable task.
Types ¶
type OptsIterate ¶ added in v0.2.0
type OptsIterate struct { // IterableMemKey is the key in memory where the iterable items exist. // The iterable memory must be a []string. IterableMemKey string // ResultMemKey is the key in memory where the selected item's index is // stored. Use this key to access the results of the Iterable task. ResultMemKeyIdx string }
OptsIterate holds the options for an iterable task.
Click to show internal directories.
Click to hide internal directories.