Documentation
¶
Index ¶
- func AppendStringToFile(path, text string) error
- func CleanupPath(path string) string
- func ConvertToJSON(folder []Folder) ([]byte, error)
- func ConvertToYaml(folder []Folder) ([]byte, error)
- func EnsureFolder(p string) string
- func IsFolder(p string) bool
- func PathJoin(p ...string) string
- func PathSplitPrefix(path string) (string, string)
- func WriteToFile(file string, data []byte) error
- type Client
- func (client *Client) CollectPaths(path string) ([]string, error)
- func (client *Client) FolderExport(path string) (Folder, error)
- func (client *Client) FolderRead(path string) ([]interface{}, error)
- func (client *Client) GetMounts() map[string]string
- func (client *Client) MountpathSplitPrefix(path string) (string, string, error)
- func (client *Client) PathReader(parentFolder *Folder, path string) error
- func (client *Client) SecretDelete(path string) (*api.Secret, error)
- func (client *Client) SecretRead(path string) map[string]interface{}
- func (client *Client) SecretWrite(path string, data map[string]interface{})
- func (client *Client) SetEngineType(engineType string)
- func (client *Client) UseEngine(engine string)
- type Folder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendStringToFile ¶
*
- Append string to the end of file *
- path: the path of the file
- text: the string to be appended. If you want to append text line to file,
- put a newline '\n' at the of the string.
func CleanupPath ¶
CleanupPath cleans up unwanted characters so that the path looks nice and clean
func ConvertToJSON ¶
ConvertToJSON will return the Folder object as yaml
func ConvertToYaml ¶
ConvertToYaml will return the Folder object as yaml
func EnsureFolder ¶
EnsureFolder ensures a path is a folder (adds a trailing "/").
func IsFolder ¶
IsFolder returns true if the path is a folder Folders are suffixed with "/" in Vault
func PathSplitPrefix ¶
PathSplitPrefix will split the first part of a string into it's own variable and return it together with the rest of the path
func WriteToFile ¶
WriteToFile will create a file and store the provieded data in it
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client describes the arguments that is needed to to establish a connecting to a Vault instance
func (*Client) CollectPaths ¶
CollectPaths will retrieve all paths to secrets defined under the given path
func (*Client) FolderExport ¶
FolderExport will export all subfolders and secrets from a specified location
func (*Client) FolderRead ¶
FolderRead reads the subpaths and secrets of the provided path
func (*Client) MountpathSplitPrefix ¶
func (*Client) PathReader ¶
PathReader recursively reads the provided path and all subpaths
func (*Client) SecretDelete ¶
SecretDelete deletet a Vault secret by given path
func (*Client) SecretRead ¶
SecretRead is used for reading a secret from a Vault instance
func (*Client) SecretWrite ¶
SecretWrite is used for writing data to a Vault instance
func (*Client) SetEngineType ¶
SetEngineType defines which vault secret engine type that is being used