Move meta into its own package

This commit is contained in:
Jeff Mitchell
2016-04-01 13:16:05 -04:00
parent da00982529
commit 33326b30c3
79 changed files with 326 additions and 233 deletions

View File

@@ -12,11 +12,12 @@ import (
"github.com/hashicorp/vault/helper/password"
"github.com/hashicorp/vault/helper/pgpkeys"
"github.com/hashicorp/vault/helper/xor"
"github.com/hashicorp/vault/meta"
)
// GenerateRootCommand is a Command that generates a new root token.
type GenerateRootCommand struct {
Meta
meta.Meta
// Key can be used to pre-seed the key. If it is set, it will not
// be asked with the `password` helper.
@@ -30,7 +31,7 @@ func (c *GenerateRootCommand) Run(args []string) int {
var init, cancel, status, genotp bool
var nonce, decode, otp, pgpKey string
var pgpKeyArr pgpkeys.PubKeyFilesFlag
flags := c.Meta.FlagSet("generate-root", FlagSetDefault)
flags := c.Meta.FlagSet("generate-root", meta.FlagSetDefault)
flags.BoolVar(&init, "init", false, "")
flags.BoolVar(&cancel, "cancel", false, "")
flags.BoolVar(&status, "status", false, "")
@@ -315,7 +316,7 @@ Usage: vault generate-root [options] [key]
General Options:
` + generalOptionsUsage() + `
` + meta.GeneralOptionsUsage() + `
Rekey Options: