Documentation ¶
Index ¶
- func NewFakeClient() secreturl.Client
- type FakeClient
- func (c *FakeClient) Read(secretName string) (map[string]interface{}, error)
- func (c *FakeClient) ReadObject(secretName string, secret interface{}) error
- func (c *FakeClient) ReplaceURIs(s string) (string, error)
- func (c *FakeClient) Write(secretName string, data map[string]interface{}) (map[string]interface{}, error)
- func (c *FakeClient) WriteObject(secretName string, secret interface{}) (map[string]interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FakeClient ¶
type FakeClient struct {
// contains filtered or unexported fields
}
FakeClient a local file system based client loading/saving content from the given URL
func (*FakeClient) Read ¶
func (c *FakeClient) Read(secretName string) (map[string]interface{}, error)
Read reads a named secret from the vault
func (*FakeClient) ReadObject ¶
func (c *FakeClient) ReadObject(secretName string, secret interface{}) error
ReadObject reads a generic named object from vault. The secret _must_ be serializable to JSON.
func (*FakeClient) ReplaceURIs ¶
func (c *FakeClient) ReplaceURIs(s string) (string, error)
ReplaceURIs will replace any local: URIs in a string
func (*FakeClient) Write ¶
func (c *FakeClient) 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 (*FakeClient) WriteObject ¶
func (c *FakeClient) 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.
Click to show internal directories.
Click to hide internal directories.