Documentation ¶
Index ¶
- func AddPrefixToVKVPath(p, mountPath, apiPrefix string) string
- func AssemblePath(path string, client *vaultApi.Client) (string, error)
- func IsRootPath(basePath string) bool
- func IsStorage(pType string) bool
- func KvPreflightVersionRequest(client *vaultApi.Client, path string) (string, int, error)
- func PathToWebURL(vaultAddr, path string) string
- func SecretToListOfStr(s *vaultApi.Secret) ([]string, error)
- type Authenticator
- type Client
- type LdapAuthenticator
- type Node
- type NodeType
- type Vaultclient
- func (v *Vaultclient[A]) GetVaultAddr() string
- func (v *Vaultclient[A]) ListMounts() (map[string]*vaultApi.MountOutput, error)
- func (c *Vaultclient[A]) ListTree(basePath string) ([]*Node, error)
- func (v *Vaultclient[A]) ListTreeFiltered(basePath string) ([]*Node, error)
- func (v *Vaultclient[A]) Read(secretPath, optionalSecretVersion string) (map[string]interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPrefixToVKVPath ¶
AddPrefixToVKVPath in v2 di/bluh will become di/data/bluh and an optional version param in the url
func IsRootPath ¶
func KvPreflightVersionRequest ¶
KvPreflightVersionRequest taken from vault/command/kv_helpers.go check if the path given is kv v2 or v1
func PathToWebURL ¶
Vault path to Web url ${mount}/database/user -> https://${vaulrAddr}/ui/vault/secrets/${mount}/show/database/user
Types ¶
type Authenticator ¶
func NewLdapAuth ¶
func NewLdapAuth(username, password, vaultAddr string) Authenticator
type Client ¶
type Client[A Authenticator] interface { Read(secretPath, optionalSecretVersion string) (map[string]interface{}, error) ListMounts() (map[string]*vaultApi.MountOutput, error) ListTree(basePath string) ([]*Node, error) ListTreeFiltered(basePath string) ([]*Node, error) GetVaultAddr() string }
func NewClient ¶
func NewClient[A Authenticator](a A) Client[Authenticator]
type LdapAuthenticator ¶
type LdapAuthenticator struct {
// contains filtered or unexported fields
}
func (*LdapAuthenticator) GetVaultAddr ¶
func (la *LdapAuthenticator) GetVaultAddr() string
type Node ¶
func (*Node) GetFullPath ¶
type Vaultclient ¶
type Vaultclient[A Authenticator] struct { Auth A // contains filtered or unexported fields }
func (*Vaultclient[A]) GetVaultAddr ¶
func (v *Vaultclient[A]) GetVaultAddr() string
func (*Vaultclient[A]) ListMounts ¶
func (v *Vaultclient[A]) ListMounts() (map[string]*vaultApi.MountOutput, error)
func (*Vaultclient[A]) ListTree ¶
func (c *Vaultclient[A]) ListTree(basePath string) ([]*Node, error)
func (*Vaultclient[A]) ListTreeFiltered ¶
func (v *Vaultclient[A]) ListTreeFiltered(basePath string) ([]*Node, error)
List keys including mounts, filter out non secrets / non expandable paths by expandable I mean things like secret engines, they are not expandable
Click to show internal directories.
Click to hide internal directories.