Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var InitCmd = &cobra.Command{ Use: "init", Short: "Initializes an Ironstar project", Long: "Initializes an Ironstar project by creating configuration files in the current working directory", Run: func(cmd *cobra.Command, args []string) { err := services.InitializeIronstarProject() if err != nil { if err != api.ErrIronstarAPICall { fmt.Println() color.Red(err.Error()) } os.Exit(1) } color.Green("Successfully created the required Ironstar configuration files!") fmt.Println() color.Green("Run `iron subscription link [subscription-name]` to link this project to a remote Ironstar subscription") }, }
InitCmd - `iron init`
View Source
var LoginCmd = &cobra.Command{ Use: "login [email]", Short: "Authenticate for the Ironstar API", Long: "Authenticate and store credentials for use against the Ironstar API", Run: func(cmd *cobra.Command, args []string) { err := auth.IronstarAPILogin(args, flags.Acc) if err != nil { if err != api.ErrIronstarAPICall { fmt.Println() color.Red(err.Error()) } os.Exit(1) } }, }
LoginCmd - `iron auth login`
View Source
var LogoutCmd = &cobra.Command{ Use: "logout [email]", Short: "Logout from your Ironstar API session", Long: "Logout from your Ironstar API session. This destroys the session token in the Ironstar system", Run: func(cmd *cobra.Command, args []string) { err := auth.Logout(args, flags.Acc) if err != nil { if err != api.ErrIronstarAPICall { fmt.Println() color.Red(err.Error()) } os.Exit(1) } }, }
LogoutCmd - `iron auth logout`
View Source
var UpgradeCmd = &cobra.Command{ Use: "upgrade", Short: "Upgrade to the latest version of the Ironstar CLI", Long: "Upgrade to the latest version of the Ironstar CLI", Run: func(cmd *cobra.Command, args []string) { err := version.Upgrade(flags.Acc) if err != nil { if err != api.ErrIronstarAPICall { fmt.Println() color.Red(err.Error()) } os.Exit(1) } }, }
UpgradeCmd - `iron upgrade`
View Source
var VersionCmd = &cobra.Command{ Use: "version [version]", Short: "Print Ironstar CLI version information", Long: "Print Ironstar CLI version information including 'Build Date', 'Compiler' and 'Platform'", Run: func(cmd *cobra.Command, args []string) { if len(args) == 0 || args[0] == "" { version.Display() return } err := version.Select(args[0], flags.Acc) if err != nil { if err != api.ErrIronstarAPICall { fmt.Println() color.Red(err.Error()) } os.Exit(1) } }, }
VersionCmd - `iron version`
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.