Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CompletionCmd = &cobra.Command{ Use: "completion", Short: TRCLI("cli.completion.summary"), Long: TRCLI("cli.completion.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: TRCLI("cli.configure.summary"), Long: TRCLI("cli.configure.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: TRCLI("cli.configure.get.summary"), Long: TRCLI("cli.configure.get.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: TRCLI("cli.unconfigure.summary"), Long: TRCLI("cli.unconfigure.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: TRCLI("cli.version.summary"), Long: TRCLI("cli.version.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.