blob: 8f306356267b9d177c41e676459b96ade09751ec (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
package cmd
import (
"github.com/spf13/cobra"
"github.com/vespa-engine/vespa/client/go/vespa"
)
func init() {
if vespa.Auth0AccessTokenEnabled() {
rootCmd.AddCommand(authCmd)
authCmd.AddCommand(certCmd)
authCmd.AddCommand(apiKeyCmd)
authCmd.AddCommand(loginCmd)
authCmd.AddCommand(logoutCmd)
} else {
rootCmd.AddCommand(certCmd)
rootCmd.AddCommand(apiKeyCmd)
}
}
var authCmd = &cobra.Command{
Use: "auth",
Short: "Manage Vespa Cloud credentials",
Long: `Manage Vespa Cloud credentials.`,
DisableAutoGenTag: true,
Run: func(cmd *cobra.Command, args []string) {
// Root command does nothing
cmd.Help()
exitFunc(1)
},
}
|