localvault

package
v2.1.112 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const CanonicalClusterPath = "currentCluster"

CanonicalClusterPath this is the path where the client will fall back when secrets are not found at the standard path

Variables

This section is empty.

Functions

func NewFileSystemClient

func NewFileSystemClient(dir string) secreturl.Client

NewFileSystemClient create a new local file system based client loading content from the given URL

Types

type FileSystemClient

type FileSystemClient struct {
	Dir string
}

FileSystemClient a local file system based client loading/saving content from the given URL

func (*FileSystemClient) Read

func (c *FileSystemClient) Read(secretName string) (map[string]interface{}, error)

Read reads a named secret from the vault

func (*FileSystemClient) ReadObject

func (c *FileSystemClient) ReadObject(secretName string, secret interface{}) error

ReadObject reads a generic named object from vault. The secret _must_ be serializable to JSON.

func (*FileSystemClient) ReplaceURIs

func (c *FileSystemClient) ReplaceURIs(s string) (string, error)

ReplaceURIs will replace any local: URIs in a string

func (*FileSystemClient) Write

func (c *FileSystemClient) Write(secretName string, data map[string]interface{}) (map[string]interface{}, error)

Write writes a named secret to the vault with the data provided. Data can be a generic map of stuff, but at all points in the map, keys _must_ be strings (not bool, int or even interface{}) otherwise you'll get an error

func (*FileSystemClient) WriteObject

func (c *FileSystemClient) WriteObject(secretName string, secret interface{}) (map[string]interface{}, error)

WriteObject writes a generic named object to the vault. The secret _must_ be serializable to JSON.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL