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

@@ -11,13 +11,14 @@ import (
"strings"
"github.com/hashicorp/vault/builtin/logical/ssh"
"github.com/hashicorp/vault/meta"
"github.com/mitchellh/mapstructure"
)
// SSHCommand is a Command that establishes a SSH connection
// with target by generating a dynamic key
type SSHCommand struct {
Meta
meta.Meta
}
// Structure to hold the fields returned when asked for a credential from SSHh backend.
@@ -34,7 +35,7 @@ func (c *SSHCommand) Run(args []string) int {
var noExec bool
var sshCmdArgs []string
var sshDynamicKeyFileName string
flags := c.Meta.FlagSet("ssh", FlagSetDefault)
flags := c.Meta.FlagSet("ssh", meta.FlagSetDefault)
flags.StringVar(&format, "format", "table", "")
flags.StringVar(&role, "role", "", "")
flags.StringVar(&mountPoint, "mount-point", "ssh", "")
@@ -256,7 +257,7 @@ Usage: vault ssh [options] username@ip
General Options:
` + generalOptionsUsage() + `
` + meta.GeneralOptionsUsage() + `
SSH Options: