cliapp

package
v0.4.2 Latest Latest
Warning

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

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

Documentation

Overview

Package cliapp owns the target-independent schema for trb/cli applications.

Index

Constants

View Source
const (
	PackageName     = "trb/cli"
	ModulePath      = "trb/cli/index"
	ProjectProvider = "trb.cli.schema"
)

Variables

This section is empty.

Functions

Types

type Command

type Command struct {
	Name             string
	About            string
	MemberName       string
	Enum             TypeReference
	Payload          *Record
	PayloadName      string
	PayloadNamedOnly bool
}

type Field

type Field struct {
	Name        string
	Long        string
	Short       string
	About       string
	ValueName   string
	Kind        ValueKind
	Positional  bool
	Required    bool
	HasDefault  bool
	Nullable    bool
	ModulePath  string
	TypeName    string
	SourceOrder int
	Span        packageextension.SourceSpan
}

type Invocation

type Invocation struct {
	ModulePath string
	Offset     int
	Schema     Schema
}

type InvocationRequest

type InvocationRequest struct {
	ModulePath string
	Offset     int
	Root       TypeReference
	Span       packageextension.SourceSpan
}

type Issue

type Issue struct {
	ModulePath string
	Message    string
	Span       packageextension.SourceSpan
}

type Manifest

type Manifest struct {
	Invocations []Invocation
}

func ManifestFrom

func ManifestFrom(extensions []ir.Extension) *Manifest

func (*Manifest) ExtensionName

func (*Manifest) ExtensionName() string

func (*Manifest) Invocation

func (m *Manifest) Invocation(modulePath string, offset int) (*Invocation, bool)

func (*Manifest) InvocationIndex

func (m *Manifest) InvocationIndex(modulePath string, offset int) (int, *Invocation, bool)

type Record

type Record struct {
	ModulePath string
	Name       string
	Fields     []Field
	Defaults   bool
}

type Schema

type Schema struct {
	Root            Record
	SubcommandField string
	SubcommandOrder int
	SubcommandEnum  TypeReference
	Commands        []Command
}

type TypeReference

type TypeReference struct {
	ModulePath string
	Name       string
}

type ValueKind

type ValueKind string
const (
	StringValue  ValueKind = "string"
	IntegerValue ValueKind = "integer"
	FloatValue   ValueKind = "float"
	BooleanValue ValueKind = "boolean"
)

Jump to

Keyboard shortcuts

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