cmd

package
v0.1.29560 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: MIT Imports: 68 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CreateUUID = func() string { return uuid.New().String() }
)

Functions

func CommandStr added in v0.1.15824

func CommandStr() string

Returns a string (e.g. "circleci context list") indicating what subcommand is being called, without any args or flags, for API headers.

func CreateTelemetry added in v0.1.28363

func CreateTelemetry(config *settings.Config) telemetry.Client

Make sure the user gave their approval for the telemetry and

func Execute

func Execute() error

Execute adds all child commands to rootCmd, sets the flags appropriately and put the telemetry client in the command context. This function is called by main.main(). It only needs to happen once to the rootCmd

func GetCommandInformation added in v0.1.28363

func GetCommandInformation(cmd *cobra.Command, getParent bool) telemetry.CommandInfo

Utility function used when creating telemetry events. It takes a cobra Command and creates a telemetry.CommandInfo of it If getParent is true, puts both the command's args in `LocalArgs` and the parent's args Else only put the command's args Note: child flags overwrite parent flags with same name

func MakeCommands

func MakeCommands() *cobra.Command

MakeCommands creates the top level commands

Types

type ExampleSchema added in v0.1.8731

type ExampleSchema struct {
	Description string             `yaml:"description,omitempty"`
	Usage       ExampleUsageSchema `yaml:"usage,omitempty"`
	Result      ExampleUsageSchema `yaml:"result,omitempty"`
}

type ExampleUsageSchema added in v0.1.8731

type ExampleUsageSchema struct {
	Version   string      `yaml:"version,omitempty"`
	Setup     bool        `yaml:"setup,omitempty"`
	Orbs      interface{} `yaml:"orbs,omitempty"`
	Jobs      interface{} `yaml:"jobs,omitempty"`
	Workflows interface{} `yaml:"workflows"`
}

type OrbSchema added in v0.1.8731

type OrbSchema struct {
	Version     float32                  `yaml:"version,omitempty"`
	Description string                   `yaml:"description,omitempty"`
	Display     yaml.Node                `yaml:"display,omitempty"`
	Orbs        yaml.Node                `yaml:"orbs,omitempty"`
	Commands    yaml.Node                `yaml:"commands,omitempty"`
	Executors   yaml.Node                `yaml:"executors,omitempty"`
	Jobs        yaml.Node                `yaml:"jobs,omitempty"`
	Examples    map[string]ExampleSchema `yaml:"examples,omitempty"`
}

type TelemetryAPIClient added in v0.1.28363

type TelemetryAPIClient interface {
	GetMyUserId() (string, error)
}

func CreateAPIClient added in v0.1.28363

func CreateAPIClient(config *settings.Config) TelemetryAPIClient

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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