Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CompletionCmd = &cobra.Command{ Use: "completion", Short: TR("completion.cli.summary"), Long: TR("completion.cli.description"), RunE: func(cmd *cobra.Command, args []string) error { err := RootCmd.GenBashCompletion(os.Stdout) if err != nil { return err } return nil }, }
CompletionCmd defines 'completion' subcommand
View Source
var ConfigureCmd = &cobra.Command{ Use: "configure", Short: TR("configure.cli.summary"), Long: TR("configure.cli.description"), RunE: func(cmd *cobra.Command, args []string) error { pn := getSpecifiedProfileName() if pn == "" { pn = "default" } profile, err := collectProfileInfo(pn) if err != nil { cmd.SilenceUsage = true return err } err = saveProfile(pn, profile) if err != nil { cmd.SilenceUsage = true return err } return nil }, }
ConfigureCmd defines 'configure' subcommand
View Source
var ConfigureGetCmd = &cobra.Command{ Use: "get", Short: TR("configure.get.cli.summary"), Long: TR("configure.get.cli.description"), RunE: func(cmd *cobra.Command, args []string) error { pn := getSpecifiedProfileName() if pn == "" { pn = "default" } p, err := loadProfile(pn) if err != nil { return err } prettyPrintObjectAsJSON(p) return nil }, }
ConfigureGetCmd defineds 'get' subcommand
View Source
var UnconfigureCmd = &cobra.Command{ Use: "unconfigure", Short: TR("unconfigure.cli.summary"), Long: TR("unconfigure.cli.description"), RunE: func(cmd *cobra.Command, args []string) error { pn := getSpecifiedProfileName() if pn == "" { pn = "default" } if confirmDeleteProfile(pn) { err := deleteProfile(pn) if err != nil { cmd.SilenceUsage = true return err } } return nil }, }
UnconfigureCmd defines 'unconfigure' subcommand
View Source
var VersionCmd = &cobra.Command{ Use: "version", Short: TR("version.cli.summary"), Long: TR("version.cli.description"), Run: func(cmd *cobra.Command, args []string) { fmt.Printf("SORACOM API client v%s\n", version) }, }
VersionCmd defines 'version' subcommand
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.