Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDebugCommands ¶
AddDebugCommands returns standard operational CLI commands for probes and network tests.
func ParseCLIRequest ¶ added in v0.4.0
func ParseCLIRequest(rawArgs []string, schema CLIRequestSchema) (map[string]any, error)
ParseCLIRequest parses raw CLI arguments against a request schema and returns a typed payload map.
func ValidateRequestSchema ¶ added in v0.4.0
func ValidateRequestSchema(schema CLIRequestSchema) error
ValidateRequestSchema checks field names and flag aliases for ambiguity.
Types ¶
type CLIBinding ¶
CLIBinding maps an action to a command name, documentation, and examples.
func Command ¶
func Command(cmd, desc string) CLIBinding
Command constructs a new CLI route binding.
func (CLIBinding) String ¶
func (b CLIBinding) String() string
func (CLIBinding) WithAliases ¶
func (b CLIBinding) WithAliases(aliases ...string) CLIBinding
WithAliases attaches alternative invocation aliases.
func (CLIBinding) WithExamples ¶ added in v0.2.0
func (b CLIBinding) WithExamples(examples ...string) CLIBinding
WithExamples attaches usage examples to the command help output.
type CLIFieldSpec ¶ added in v0.4.0
type CLIFieldSpec struct {
Name string
Type string
Flags []string
Usage string
Required bool
Positional bool
}
CLIFieldSpec describes one request field exposed as a CLI flag or positional.
type CLIInputBinding ¶ added in v0.4.0
type CLIInputBinding struct {
Schema CLIRequestSchema
}
CLIInputBinding attaches a CLI request schema to an action independently of the command routing binding.
func (CLIInputBinding) String ¶ added in v0.4.0
func (b CLIInputBinding) String() string
type CLIRequestSchema ¶ added in v0.4.0
type CLIRequestSchema struct {
Name string
Fields []CLIFieldSpec
}
CLIRequestSchema describes the dynamic request shape for a CLI command.
type Option ¶
type Option func(*Transport)
func WithExecutable ¶ added in v0.2.0
WithExecutable overrides the binary name used in CLI help & usage output.
func WithOutput ¶
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}