Documentation ¶
Index ¶
Constants ¶
const ( // EnvVaultAddress stores vault address env var name EnvVaultAddress = "VAULT_ADDR" // EnvVaultCACert stores vault CA cert env var name EnvVaultCACert = "VAULT_CACERT" // EnvVaultClientCert stores vault client cert env var name EnvVaultClientCert = "VAULT_CLIENT_CERT" // EnvVaultClientKey stores vault client key env var name EnvVaultClientKey = "VAULT_CLIENT_KEY" // EnvVaultInsecure stores vault skip SSL host verify env var name EnvVaultInsecure = "VAULT_SKIP_VERIFY" // EnvVaultTLSServerName stores vault TLS server name env var name EnvVaultTLSServerName = "VAULT_TLS_SERVER_NAME" // EnvVaultToken stores vault token env var name EnvVaultToken = "VAULT_TOKEN" )
Variables ¶
This section is empty.
Functions ¶
func GeneralOptionsUsage ¶
func GeneralOptionsUsage() string
GeneralOptionsUsage returns the usage documentation for commonly available options this is ripped off (https://github.com/hashicorp/vault/blob/master/meta/meta.go#L177-L208)
func VaultKeyCipher ¶
VaultKeyCipher returns KMS key handle to use for encrypting and decrypting keys
Types ¶
type FlagSetFlags ¶
type FlagSetFlags uint
FlagSetFlags is an enum to define what flags are present in the default FlagSet returned by Meta.FlagSet.
const ( // FlagSetNone allows to implement FlagSet enum FlagSetNone FlagSetFlags = 0 // FlagSetServer allows to provide FlagSet flags FlagSetServer FlagSetFlags = 1 << iota // FlagSetDefault allows to use default FlagSet flags FlagSetDefault = FlagSetServer )
type InitCommand ¶
type InitCommand struct { // meta flags contain vault client config Meta }
InitCommand implements vault initialization It fulfills cli.Command interface
func (*InitCommand) Run ¶
func (c *InitCommand) Run(args []string) int
Run runs init command which initializes vault server If init command fails it returns non-zero integer
func (*InitCommand) Synopsis ¶
func (c *InitCommand) Synopsis() string
Synopsis provides a simple command description
type Meta ¶
Meta contains meta-options used by almost every command This is a stripped down version of vault meta struct.
func (*Meta) Client ¶
Client initializes vault api.Client and returns it or fails with error This is heavily inspired by (https://github.com/hashicorp/vault/blob/master/meta/meta.go#L74-L98)
type UnsealCommand ¶
type UnsealCommand struct { // meta flags contain vault client config Meta }
UnsealCommand implements vault unsealing It fulfills cli.Command interface
func (*UnsealCommand) Help ¶
func (c *UnsealCommand) Help() string
Help returns detailed command help
func (*UnsealCommand) Run ¶
func (c *UnsealCommand) Run(args []string) int
Run runs unsearl command which unseals vault servers If unseal fails Run returns non-zero integer
func (*UnsealCommand) Synopsis ¶
func (c *UnsealCommand) Synopsis() string
Synopsis provides a simple command description
type VaultKeys ¶
type VaultKeys struct { // RootToken is vault root token RootToken string `json:"root_token,omitempty"` // MasterKeys are vault master keys used to unseal vault servers MasterKeys []string `json:"master_keys,omitempty"` }
VaultKeys stores vault root token and master keys