Documentation
¶
Overview ¶
Package cli provides CLI access to the Platform.CC API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AutoCompleteListCmd = &cobra.Command{ Hidden: true, Use: "_ac", Run: func(cmd *cobra.Command, args []string) { output.Enable = false output.Logging = false if len(args) > 0 { argStr := "" for _, arg := range strings.Split(args[0], ":") { argStr += strings.TrimSpace(arg) + ":" } argStr = strings.TrimSuffix(argStr, ":") args = strings.Split(argStr, " ") } if len(args) <= 1 { argStr := "" if len(args) > 0 { argStr = args[0] } out := filterListCommandAliases(RootCmd, argStr) output.WriteStdout(strings.Join(out, " ")) } else if len(args) > 1 { findCmd, _, err := RootCmd.Find(strings.Split(args[0], ":")) if err != nil { return } if findCmd.Parent() == containerCmd { handleServiceFlag(containerCmd, args) return } else if findCmd.Parent() == databaseCmd { handleServiceFlag(databaseCmd, args) handleDatabaseFlag(databaseCmd, args) return } } }, }
AutoCompleteListCmd list every possible command for Bash auto-complete.
View Source
var ( // ErrDefinitionNotFound is an error returns when a service definition is not found. ErrDefinitionNotFound = errors.New("definition not found") )
View Source
var ListCmd = &cobra.Command{ Use: "list", Version: "", Short: "Show this list.", Run: func(cmd *cobra.Command, args []string) { commandIntro(RootCmd.Version) output.WriteStdout("\nAvailable Commands:\n") displayCommandList(RootCmd) }, }
ListCmd lists all available commands.
View Source
var RootCmd = &cobra.Command{ Use: "platform_cc [-v verbose]", Version: "", Run: func(cmd *cobra.Command, args []string) { commandIntro(cmd.Version) output.WriteStdout("\nAvailable Commands:\n") displayCommandList(cmd) }, }
RootCmd is the top level command.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.