webui

package
v0.0.7-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

func New

func New(root *redant.Command) *App

func (*App) Handler

func (a *App) Handler() http.Handler

type ArgMeta

type ArgMeta struct {
	Name        string   `json:"name"`
	Description string   `json:"description,omitempty"`
	Type        string   `json:"type"`
	EnumValues  []string `json:"enumValues,omitempty"`
	Required    bool     `json:"required"`
	Default     string   `json:"default,omitempty"`
}

type CommandMeta

type CommandMeta struct {
	ID          string     `json:"id"`
	Name        string     `json:"name"`
	Use         string     `json:"use"`
	Aliases     []string   `json:"aliases,omitempty"`
	Short       string     `json:"short,omitempty"`
	Long        string     `json:"long,omitempty"`
	Deprecated  string     `json:"deprecated,omitempty"`
	RawArgs     bool       `json:"rawArgs"`
	Path        []string   `json:"path"`
	Description string     `json:"description,omitempty"`
	Flags       []FlagMeta `json:"flags"`
	Args        []ArgMeta  `json:"args"`
}

type FlagMeta

type FlagMeta struct {
	Name        string   `json:"name"`
	Shorthand   string   `json:"shorthand,omitempty"`
	Envs        []string `json:"envs,omitempty"`
	Description string   `json:"description,omitempty"`
	Type        string   `json:"type"`
	EnumValues  []string `json:"enumValues,omitempty"`
	Required    bool     `json:"required"`
	Default     string   `json:"default,omitempty"`
}

type RunRequest

type RunRequest struct {
	Command string         `json:"command"`
	Flags   map[string]any `json:"flags,omitempty"`
	Args    map[string]any `json:"args,omitempty"`
	RawArgs []string       `json:"rawArgs,omitempty"`
}

type RunResponse

type RunResponse struct {
	OK         bool     `json:"ok"`
	Command    string   `json:"command"`
	Program    string   `json:"program,omitempty"`
	Argv       []string `json:"argv,omitempty"`
	Invocation string   `json:"invocation"`
	Stdout     string   `json:"stdout"`
	Stderr     string   `json:"stderr"`
	Error      string   `json:"error"`
	Combined   string   `json:"combined"`
}

Jump to

Keyboard shortcuts

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