bootstrap

package
v2.0.8 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStripeCLIConfig

func GetStripeCLIConfig() *cliconfig.Config

GetStripeCLIConfig returns a pointer to the CLI config that plugins can reference.

func StartPlugin

func StartPlugin(bc *Config, cmdExecute func(args []string, ctx context.Context) error, pluginRootCmd *cobra.Command, pluginInfo telemetry.PluginInfo) error

StartPlugin defines the interfaces for the plugin and then serves them over RPC The CLI can then interact with the plugin from there

Types

type CommandInfo

type CommandInfo struct {
	Name     string        `toml:"Name" json:"name"`
	Desc     string        `toml:"Desc" json:"desc,omitempty"`
	Commands []CommandInfo `toml:"Command,omitempty" json:"commands,omitempty"`
}

CommandInfo describes a plugin subcommand for inclusion in the plugins.toml manifest. The CLI reads this metadata to display plugin subcommands in --map output and shell completion without launching the plugin binary.

func ExtractCommandTree

func ExtractCommandTree(cmd *cobra.Command) []CommandInfo

ExtractCommandTree walks a cobra.Command tree and returns a slice of CommandInfo suitable for serialization into a plugins.toml manifest. Hidden commands, deprecated commands, and the auto-generated "help" command are excluded.

type Config

type Config struct {
	HandshakeKey   string
	HandshakeValue string
}

type PluginImpl

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

func (*PluginImpl) RunCommand

func (g *PluginImpl) RunCommand(args []string) (string, error)

type PluginImplGRPC

type PluginImplGRPC struct {
}

func (*PluginImplGRPC) RunCommand

func (p *PluginImplGRPC) RunCommand(additionalInfo *proto.AdditionalInfo, args []string) error

Jump to

Keyboard shortcuts

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