Documentation ¶
Index ¶
- Variables
- func CommandStr() string
- func CreateTelemetry(config *settings.Config) telemetry.Client
- func Execute() error
- func GetCommandInformation(cmd *cobra.Command, getParent bool) telemetry.CommandInfo
- func MakeCommands() *cobra.Command
- type ExampleSchema
- type ExampleUsageSchema
- type OrbSchema
- type TelemetryAPIClient
Constants ¶
This section is empty.
Variables ¶
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
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
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 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
func CreateAPIClient ¶ added in v0.1.28363
func CreateAPIClient(config *settings.Config) TelemetryAPIClient