Documentation ¶
Index ¶
- func Apply(_ *cli.Context) (int, error)
- func ExecWrapper(f func(ctx *cli.Context) (int, error)) cli.ActionFunc
- func Init(_ *cli.Context) (int, error)
- func KVGetPath(_ *cli.Context) (int, error)
- func KVGetVersion(_ *cli.Context) (int, error)
- func KVSetPath(ctx *cli.Context) (int, error)
- func KVSetVersion(ctx *cli.Context) (int, error)
- func Plan(_ *cli.Context) (int, error)
- func SecretDelete(ctx *cli.Context) (int, error)
- func SecretList(ctx *cli.Context) (int, error)
- func SecretRead(ctx *cli.Context) (int, error)
- func SecretRotateFrom(ctx *cli.Context) (int, error)
- func SecretWrite(ctx *cli.Context) (int, error)
- func Status(_ *cli.Context) (int, error)
- func TransitCreate(ctx *cli.Context) (int, error)
- func TransitDelete(ctx *cli.Context) (int, error)
- func TransitInfo(_ *cli.Context) (int, error)
- func TransitList(_ *cli.Context) (int, error)
- func TransitUse(ctx *cli.Context) (int, error)
- type State
- func (s *State) DeleteSecret(secret string)
- func (s *State) DeleteSecretKey(secret, key string)
- func (s *State) Init()
- func (s *State) ListSecrets(secret string)
- func (s *State) Load()
- func (s *State) ReadSecretKey(secret, key string) string
- func (s *State) RotateFromOldTransitKey(key string)
- func (s *State) SetVaultKVPath(value string)
- func (s *State) SetVaultKVVersion(version int)
- func (s *State) SetVaultTransitKey(value string)
- func (s *State) Status()
- func (s *State) VaultKVPath() string
- func (s *State) VaultKVVersion() int
- func (s *State) VaultTransitKey() string
- func (s *State) WriteSecretKey(secret, key, value string)
- type StateConfig
- type Vault
- func (v *Vault) Cipher(value string) string
- func (v *Vault) CreateTransitKey(key string)
- func (v *Vault) Decipher(value string) string
- func (v *Vault) DeleteSecret(secret string)
- func (v *Vault) DeleteSecretKey(secret, key string)
- func (v *Vault) DeleteTransitKey(key string)
- func (v *Vault) GetTransitInfo()
- func (v *Vault) ListSecrets()
- func (v *Vault) ListTransitKeys()
- func (v *Vault) Status()
- func (v *Vault) WriteSecret(secret string, data map[string]interface{})
- type VaultConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecWrapper ¶
ExecWrapper gracefully logs and exits our `run` functions
Types ¶
type State ¶
type State struct { Vault struct { TransitKey string KV struct { Path string Version int } } Secrets map[string]map[string]string Config *StateConfig `yaml:"-"` }
State : Handles state information
func (*State) DeleteSecret ¶
DeleteSecret : Delete a secret from the statefile based on its name
func (*State) DeleteSecretKey ¶
DeleteSecretKey : Delete a secret:key from the statefile based on the secret and key names
func (*State) Init ¶
func (s *State) Init()
Init : Generates an empty state file at the configured state file location
func (*State) ListSecrets ¶
ListSecrets : List the secrets, safely stored into the statefile
func (*State) ReadSecretKey ¶
ReadSecretKey : Read the value of a SecretKey
func (*State) RotateFromOldTransitKey ¶
RotateFromOldTransitKey : Replace locally ciphered values with new transit key
func (*State) SetVaultKVPath ¶
SetVaultKVPath : Update state file with a Vault/Secret/Path value
func (*State) SetVaultKVVersion ¶
SetVaultKVVersion : Update state file with a Vault/Secret/Version value
func (*State) SetVaultTransitKey ¶
SetVaultTransitKey : Update state file with a Vault/TransitKey value
func (*State) Status ¶
func (s *State) Status()
Status : Returns information about statefile content
func (*State) VaultKVPath ¶
VaultKVPath : Returns the value of the configured Vault/Secret/Path
func (*State) VaultKVVersion ¶
VaultKVVersion : Returns the value of the configured Vault/Secret/Version
func (*State) VaultTransitKey ¶
VaultTransitKey : Returns the value of the configured Vault/TransitKey
func (*State) WriteSecretKey ¶
WriteSecretKey : Add or Update a key value within a secret
type StateConfig ¶
type StateConfig struct {
Path string
}
StateConfig handles state client configuration
type Vault ¶
Vault : Handles a Vault API Client
func (*Vault) CreateTransitKey ¶
CreateTransitKey : Create a new transit key in Vault
func (*Vault) DeleteSecret ¶
DeleteSecret : DeleteSecret a secret from Vault
func (*Vault) DeleteSecretKey ¶
DeleteSecretKey : Delete a key of a secret from Vault
func (*Vault) DeleteTransitKey ¶
DeleteTransitKey : Delete a transit key from Vault
func (*Vault) GetTransitInfo ¶
func (v *Vault) GetTransitInfo()
GetTransitInfo : Fetch some information from Vault about the configured TransitKey
func (*Vault) ListTransitKeys ¶
func (v *Vault) ListTransitKeys()
ListTransitKeys : List available transit keys from Vault
func (*Vault) Status ¶
func (v *Vault) Status()
Status : Return information about Vault API endpoint/cluster
func (*Vault) WriteSecret ¶
WriteSecret : Write a secret into Vault