apps

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveChainCursor

func ResolveChainCursor(cmd *collection.Vector[string], sep string) ([]string, error)

func ResolveKeyValueCursor

func ResolveKeyValueCursor(cmd *collection.Vector[string], sep string, required bool) (*utils.CmdTuple, error)

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

type CmdExecResult struct {
	Input  string
	Output string
}

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

type TopicMetaExpanded struct {
	Code        string
	Status      bool
	Timestamp   int64
	Description string
}

func ExpandTopicMeta

func ExpandTopicMeta(topic *system.TopicMeta, description string) TopicMetaExpanded

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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