Documentation ¶
Index ¶
- Variables
- func AddPrefixToVKVPath(p, mountPath, apiPrefix string) string
- func EnsureNoLeadingSlash(s string) string
- func EnsureNoTrailingSlash(s string) string
- func EnsureTrailingSlash(s string) string
- func ExtractListData(secret *api.Secret) ([]interface{}, bool)
- func IsDatabaseConfig(key string) bool
- func IsKVv2(path string, client *api.Client) (string, bool, error)
- func IsPolicy(key string) bool
- func IsPolicyRoot(key string) bool
- func SanitizePath(s string) string
- type Config
- func (vc *Config) DeletePolicy(name string) error
- func (vc *Config) DeleteSecret(key string) error
- func (vc *Config) ListPolicies() ([]string, error)
- func (vc *Config) ListSecrets(key string) ([]string, error)
- func (vc *Config) OverwritePolicy(name string, rules string) error
- func (vc *Config) OverwriteSecret(path string, secret map[string]interface{}) error
- func (vc *Config) PurgePaths(paths []string) error
- type Ignore
- type PurgeContext
Constants ¶
This section is empty.
Variables ¶
View Source
var VaultDatabaseConfigPrefix = []string{"/database/config/"}
View Source
var VaultPolicyPrefix = []string{"/sys/policy/"}
View Source
var VaultPolicyProtected = []string{"/sys/policy/default", "/sys/policy/root"}
Functions ¶
func AddPrefixToVKVPath ¶
AddPrefixToVKVPath mutates the provided path
func EnsureNoLeadingSlash ¶
EnsureNoLeadingSlash ensures the given string has a trailing slash.
func EnsureNoTrailingSlash ¶
EnsureNoTrailingSlash ensures the given string has a trailing slash.
func EnsureTrailingSlash ¶
EnsureTrailingSlash ensures the given string has a trailing slash.
func ExtractListData ¶
ExtractListData reads the secret and returns a typed list of data and a boolean indicating whether the extraction was successful.
func SanitizePath ¶
SanitizePath removes any leading or trailing things from a "path".
Types ¶
type Config ¶
type Config struct { Address string Token string Client *vaultapi.Client Retries int Ignore *Ignore // contains filtered or unexported fields }
Config
func (*Config) ListSecrets ¶
ListSecrets
func (*Config) OverwritePolicy ¶
OverwritePolicy
func (*Config) OverwriteSecret ¶
OverwriteSecret
type PurgeContext ¶
type PurgeContext struct {
// contains filtered or unexported fields
}
PurgeContext
Click to show internal directories.
Click to hide internal directories.