summaryrefslogtreecommitdiffstats
path: root/client/go/cmd/auth.go
blob: 592c18c8b22346c7296cd424788228c7b96f65fa (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
package cmd

import (
	"fmt"

	"github.com/spf13/cobra"
)

func init() {
	rootCmd.AddCommand(authCmd)
	rootCmd.AddCommand(deprecatedCertCmd)
	rootCmd.AddCommand(deprecatedApiKeyCmd)
	authCmd.AddCommand(certCmd)
	authCmd.AddCommand(apiKeyCmd)
	authCmd.AddCommand(loginCmd)
	authCmd.AddCommand(logoutCmd)
}

var authCmd = &cobra.Command{
	Use:               "auth",
	Short:             "Manage Vespa Cloud credentials",
	Long:              `Manage Vespa Cloud credentials.`,
	DisableAutoGenTag: true,
	SilenceUsage:      false,
	Args:              cobra.MinimumNArgs(1),
	RunE: func(cmd *cobra.Command, args []string) error {
		return fmt.Errorf("invalid command: %s", args[0])
	},
}