Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) Export(key, singleKeyExportFormat string, appendMap map[string]string) (string, error)
- func (c *Client) ExportMap(key string) (map[string]string, error)
- func (c *Client) ExportToTemplate(key string, appendMap map[string]string) (string, error)
- func (c *Client) Import(prefix, secretsFilePath string, force bool) error
- func (c *Client) Read(key string) (*Secret, error)
- func (c *Client) ReadFromEnv(env, key string) (string, error)
- func (c *Client) ReadGroup(keyPrefix string) ([]*Secret, error)
- func (c *Client) ReadValue(key string) (string, error)
- func (c *Client) Template(sourceFilePath, destinationFilePath string, perms os.FileMode, ...) error
- func (c *Client) Write(key, secret string, force bool) error
- func (c *Client) WriteFile(key, file string, force bool) error
- type Options
- type Secret
Constants ¶
View Source
const ( // DefaultDestinationFilePerms are the default file permissions for destination file rendered into // disk when a specific file permission has not already been specified. DefaultDestinationFilePerms = 0644 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // Backend interface Backend backend.BackendAPI // contains filtered or unexported fields }
Client is the client that performs all operations against a treasury backend
func (*Client) Export ¶
func (c *Client) Export(key, singleKeyExportFormat string, appendMap map[string]string) (string, error)
Export returns secrets in given format format should be provided in singleKeyExportFormat e.g.: singleKeyExportFormat = "export %s='%s'\n"
func (*Client) ExportToTemplate ¶
func (*Client) Import ¶
Import imports secrets from file into treasury store, if value does not change it is not overridden
func (*Client) ReadFromEnv ¶ added in v0.8.0
ReadFromEnv returns value of given key in specified env.
func (*Client) Template ¶
func (c *Client) Template(sourceFilePath, destinationFilePath string, perms os.FileMode, appendMap, envMap map[string]string) error
Template generates a file with secrets from given template
Source Files ¶
Click to show internal directories.
Click to hide internal directories.