Documentation ¶
Index ¶
- Variables
- type Secret
- func (s *Secret) Get(key string) string
- func (s *Secret) Has(key string) bool
- func (s *Secret) JSON() string
- func (s *Secret) Password(key string, length int)
- func (s *Secret) RSAKey(bits int) error
- func (s *Secret) SSHKey(bits int) error
- func (s *Secret) Set(key, value string)
- func (s *Secret) YAML() string
- type Vault
Constants ¶
This section is empty.
Variables ¶
var NotFound error
Functions ¶
This section is empty.
Types ¶
type Secret ¶
type Secret struct {
// contains filtered or unexported fields
}
A Secret contains a set of key/value pairs that store anything you want, including passwords, RSAKey keys, usernames, etc.
func (*Secret) JSON ¶
JSON converts a Secret to its JSON representation and returns it as a string. Returns an empty string if there were any errors.
func (*Secret) RSAKey ¶
RSAKey generates a new public/private keypair, and stores it in the secret, under the 'public' and 'private' keys.
func (*Secret) SSHKey ¶
SSHKey generates a new public/private keypair, and stores it in the secret, under the 'public' and 'private' keys.
type Vault ¶
A Vault represents a means for interacting with a remote Vault instance (unsealed and pre-authenticated) to read and write secrets.
func NewVault ¶
NewVault creates a new Vault object. If an empty token is specified, the current user's token is read from ~/.vault-token.