Documentation
¶
Index ¶
- func ResolveChainCursor(cmd *collection.Vector[string], sep string) ([]string, error)
- func ResolveKeyValueCursor(cmd *collection.Vector[string], sep string, required bool) (*utils.CmdTuple, error)
- func ResolveValueCursor(cmd *collection.Vector[string]) (string, error)
- func TakeCursorValue(cmd *collection.Vector[string], required bool) (string, *collection.Vector[string], error)
- type CmdExecRequest
- type CmdExecResult
- func EmptyResult() *CmdExecResult
- func ErrorResult(err error) *CmdExecResult
- func NewResult(output string) *CmdExecResult
- func NewResultf(format string, a ...any) *CmdExecResult
- func OverrideResult(input, output string) *CmdExecResult
- func PublishEvent(data ...utils.CmdTuple) *CmdExecResult
- func RunHelp(title string, actions []CommandReference) *CmdExecResult
- type CommandApplication
- type CommandReference
- type SnapshotFlag
- type TopicMetaExpanded
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolveChainCursor ¶
func ResolveKeyValueCursor ¶
func ResolveValueCursor ¶
func ResolveValueCursor(cmd *collection.Vector[string]) (string, error)
func TakeCursorValue ¶
func TakeCursorValue(cmd *collection.Vector[string], required bool) (string, *collection.Vector[string], error)
Types ¶
type CmdExecRequest ¶
type CmdExecRequest struct {
User string
Input string
Command *collection.Vector[string]
}
type CmdExecResult ¶
func EmptyResult ¶
func EmptyResult() *CmdExecResult
func ErrorResult ¶
func ErrorResult(err error) *CmdExecResult
func NewResult ¶
func NewResult(output string) *CmdExecResult
func NewResultf ¶
func NewResultf(format string, a ...any) *CmdExecResult
func OverrideResult ¶
func OverrideResult(input, output string) *CmdExecResult
func PublishEvent ¶
func PublishEvent(data ...utils.CmdTuple) *CmdExecResult
func RunHelp ¶
func RunHelp(title string, actions []CommandReference) *CmdExecResult
func (*CmdExecResult) SetInput ¶
func (r *CmdExecResult) SetInput(input string) *CmdExecResult
type CommandApplication ¶
type CommandApplication struct {
CommandReference
Exec func(request *CmdExecRequest) *CmdExecResult
Help func() *CmdExecResult
}
type CommandReference ¶
type CommandReference struct {
Flag SnapshotFlag
Name string
Description string
Example string
}
type SnapshotFlag ¶
type SnapshotFlag string
type TopicMetaExpanded ¶
func ExpandTopicMeta ¶
func ExpandTopicMeta(topic *system.TopicMeta, description string) TopicMetaExpanded
Click to show internal directories.
Click to hide internal directories.