actionscobra

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package actionscobra is a launchr plugin providing cobra interface to actions.

Index

Constants

This section is empty.

Variables

View Source
var ActionsGroup = &launchr.CommandGroup{
	ID:    "actions",
	Title: "Actions:",
}

ActionsGroup is a command group definition.

Functions

func CobraImpl

func CobraImpl(a *action.Action, streams launchr.Streams, manager action.Manager) (*launchr.Command, error)

CobraImpl returns cobra command implementation for an action command.

Types

type JSONError added in v0.23.0

type JSONError struct {
	Message string `json:"message"`
	Code    string `json:"code,omitempty"`
}

JSONError is the error format for JSON output.

type JSONOutput added in v0.23.0

type JSONOutput struct {
	Result any        `json:"result,omitempty"`
	Error  *JSONError `json:"error,omitempty"`
}

JSONOutput is the structured output format when --json flag is used.

type Plugin

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

Plugin is launchr.Plugin to add command line interface to actions.

func (*Plugin) CobraAddCommands

func (p *Plugin) CobraAddCommands(rootCmd *launchr.Command) error

CobraAddCommands implements launchr.CobraPlugin interface to add actions in command line.

func (*Plugin) OnAppInit

func (p *Plugin) OnAppInit(app launchr.App) error

OnAppInit implements launchr.Plugin interface.

func (*Plugin) PluginInfo

func (p *Plugin) PluginInfo() launchr.PluginInfo

PluginInfo implements launchr.Plugin interface.

type YAMLError added in v0.23.0

type YAMLError struct {
	Message string `yaml:"message"`
	Code    string `yaml:"code,omitempty"`
}

YAMLError is the error format for YAML output.

type YAMLOutput added in v0.23.0

type YAMLOutput struct {
	Result any        `yaml:"result,omitempty"`
	Error  *YAMLError `yaml:"error,omitempty"`
}

YAMLOutput is the structured output format when --yaml flag is used.

Jump to

Keyboard shortcuts

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