config

package
v1.14.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigCmd = &cobra.Command{
	Use:   "config",
	Short: "Manage CLI configuration",
	Long:  "RunPod CLI Config Settings",
	Run: func(c *cobra.Command, args []string) {
		if err := viper.WriteConfig(); err != nil {
			fmt.Fprintf(os.Stderr, "Error saving config: %v\n", err)
			return
		}
		fmt.Println("Configuration saved to file:", viper.ConfigFileUsed())

		publicKey, err := ssh.GenerateSSHKeyPair("RunPod-Key-Go")
		if err != nil {
			fmt.Fprintf(os.Stderr, "Failed to generate SSH key: %v\n", err)
			return
		}

		if err := api.AddPublicSSHKey(publicKey); err != nil {
			fmt.Fprintf(os.Stderr, "Failed to add the SSH key: %v\n", err)
			return
		}
		fmt.Println("SSH key added successfully.")
	},
}
View Source
var (
	ConfigFile string
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL