cobra

package
v0.0.0-...-4b2823f Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2018 License: AGPL-3.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GenHMACKeyCmd = &cobra.Command{
	Use:   "genhmac",
	Short: "Generates a key suitable for HMAC-SHA-256",
	Long: `genhmac generates a random key 512 bytes long, the block size of
SHA256, then base64 encodes it. This is sutable for use as the jwt key for
serve and gentoken.`,
	Run: GenHMACKey,
}
View Source
var GenRSACmd = &cobra.Command{
	Use:   "genrsa",
	Short: "Generates a key suitable for RSA",
	Long: `genrsa generates a random key 2048 bits long, the block size of
SHA256, then base64 encodes it. This is sutable for use as the jwt key for
serve and gentoken.`,
	Run: GenRSA,
}
View Source
var GenTokenCmd = &cobra.Command{
	Use:   "gentoken <payload>",
	Short: "Generates a token, signed by a key.",
	Long: `Generates a token signed by either an HMAC or RSA key.
Use genhmac or genrsa to generate these keys.
Payload must be a valid JSON object
`,
	Run: GenToken,
}
View Source
var VerifyCmd = &cobra.Command{
	Use:   "verify",
	Short: "A brief description of your command",
	Long: `A longer description that spans multiple lines and likely contains examples
and usage of using your command. For example:

Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
to quickly create a Cobra application.`,
	Run: Verify,
}

Functions

func GenHMACKey

func GenHMACKey(cmd *cobra.Command, args []string)

func GenRSA

func GenRSA(cmd *cobra.Command, args []string)

func GenToken

func GenToken(cmd *cobra.Command, args []string)

func Verify

func Verify(cmd *cobra.Command, args []string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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