cli

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: AGPL-3.0 Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "0.1.0"

Functions

This section is empty.

Types

type App

type App struct {
	In       io.Reader
	Out, Err io.Writer
	Connect  func(context.Context, string) (*portable.Connection, error)
}

func New

func New() *App

func (*App) Run

func (a *App) Run(ctx context.Context, args []string) int

type HTTPError

type HTTPError struct {
	Status        int
	Code, Message string
}

func (*HTTPError) Error

func (e *HTTPError) Error() string

type Operation

type Operation struct {
	Name        string      `json:"name"`
	Method      string      `json:"method"`
	Path        string      `json:"path"`
	Description string      `json:"description"`
	Response    string      `json:"response"`
	Effect      string      `json:"effect"`
	Parameters  []Parameter `json:"parameters"`
	Body        bool        `json:"body"`
	Multipart   string      `json:"multipart,omitempty"`
	Source      string      `json:"source"`
}

Operation is one named application command backed by an existing handler. A static query in Path selects a specific representation of a shared endpoint.

func Operations

func Operations() []Operation

Operations returns the complete command catalog. Callers may sort or annotate their copy without modifying the embedded definitions used by other callers.

type Parameter

type Parameter struct {
	Name        string `json:"name"`
	In          string `json:"in"`
	Type        string `json:"type"`
	Required    bool   `json:"required"`
	Description string `json:"description"`
}

Parameter describes a named path identifier, query option or JSON body field.

Jump to

Keyboard shortcuts

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