cli

package
v0.0.0-...-33b3299 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: MIT Imports: 25 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() App

func NewWithDeps

func NewWithDeps(sendExecutor actions.SendExecutor, sink audit.Sink, mediaDownloader ...actions.MediaFileDownloader) App

func NewWithScopedDeps

func NewWithScopedDeps(replyExecutor actions.ReplyExecutor, markReadExecutor actions.MarkReadExecutor, sink audit.Sink) App

func NewWithSendFileDeps

func NewWithSendFileDeps(sendFileExecutor actions.SendFileExecutor, sink audit.Sink) App

func (App) Run

func (a App) Run(args []string, stdout io.Writer, stderr io.Writer) int

type ArgumentSpec

type ArgumentSpec struct {
	Name     string `json:"name"`
	Required bool   `json:"required"`
	Summary  string `json:"summary"`
}

type CommandSpec

type CommandSpec struct {
	Name                 string         `json:"name"`
	Summary              string         `json:"summary"`
	Usage                string         `json:"usage"`
	Arguments            []ArgumentSpec `json:"arguments,omitempty"`
	Flags                []FlagSpec     `json:"flags,omitempty"`
	CommandRef           string         `json:"command_ref"`
	Lifecycle            string         `json:"lifecycle"`
	SafetyClass          string         `json:"safety_class"`
	ReadOnly             bool           `json:"read_only"`
	WriteCapable         bool           `json:"write_capable"`
	RequiresConfirmation bool           `json:"requires_confirmation"`
	OutputModes          []string       `json:"output_modes"`
	Refs                 RefContract    `json:"refs"`
}

type DoctorCheck

type DoctorCheck struct {
	Name    string `json:"name"`
	Status  string `json:"status"`
	Summary string `json:"summary"`
}

type DoctorEnvelope

type DoctorEnvelope struct {
	OK      bool                `json:"ok"`
	Mode    string              `json:"mode"`
	Version version.Info        `json:"version"`
	Binary  string              `json:"binary,omitempty"`
	Checks  []DoctorCheck       `json:"checks"`
	Config  config.DoctorReport `json:"config"`
}

type ErrorContract

type ErrorContract struct {
	Fields []ErrorFieldSpec `json:"fields"`
}

type ErrorFieldSpec

type ErrorFieldSpec struct {
	Name     string `json:"name"`
	Type     string `json:"type"`
	Required bool   `json:"required"`
	Summary  string `json:"summary"`
}

type ExitCodeSpec

type ExitCodeSpec struct {
	Code    int    `json:"code"`
	Meaning string `json:"meaning"`
}

type FlagSpec

type FlagSpec struct {
	Name      string `json:"name"`
	ValueName string `json:"value_name,omitempty"`
	Default   string `json:"default,omitempty"`
	Required  bool   `json:"required"`
	Summary   string `json:"summary"`
}

type RefContract

type RefContract struct {
	Accepts        []string `json:"accepts"`
	Emits          []string `json:"emits"`
	RoundTrippable []string `json:"round_trippable"`
}

type Schema

type Schema struct {
	Program         string         `json:"program"`
	Version         version.Info   `json:"version"`
	Commands        []CommandSpec  `json:"commands"`
	ContractVersion string         `json:"contract_version"`
	ErrorContract   ErrorContract  `json:"error_contract"`
	ExitCodes       []ExitCodeSpec `json:"exit_codes"`
}

Jump to

Keyboard shortcuts

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