set

package
v0.83.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "set",
	Short: "Set Cloudflare Access Service Token",
	Args:  cobra.ExactArgs(1),
	Run: func(c *cobra.Command, args []string) {
		key := args[0]
		clientID := FlagClientID
		clientSecret := FlagClientSecret
		if clientID == "" {
			fmt.Print("CLIENT_ID:")
			clientID = readPasswordOrDie()
		}
		if clientSecret == "" {
			fmt.Print("CLIENT_SECRET:")
			clientSecret = readPasswordOrDie()
		}
		err := vault_cfa_service_token.Set(key, clientID, clientSecret)
		if err != nil {
			log.Fatal(err)
		}
	},
}
View Source
var FlagClientID string
View Source
var FlagClientSecret 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