fake

package
v2.1.78 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeVaultClient

type FakeVaultClient struct {
	Data map[string]map[string]interface{}
}

FakeVaultClient is an in memory implementation of vault, useful for testing

func NewFakeVaultClient

func NewFakeVaultClient() FakeVaultClient

NewFakeVaultClient creates a new FakeVaultClient

func (FakeVaultClient) Config

func (f FakeVaultClient) Config() (vaultURL url.URL, vaultToken string, err error)

Config shows the vault config

func (FakeVaultClient) List

func (f FakeVaultClient) List(path string) ([]string, error)

List the secrets in vault

func (FakeVaultClient) Read

func (f FakeVaultClient) Read(secretName string) (map[string]interface{}, error)

Read a secret from vault

func (FakeVaultClient) ReadObject

func (f FakeVaultClient) ReadObject(secretName string, secret interface{}) error

ReadObject a secret from vault

func (FakeVaultClient) ReadYaml

func (f FakeVaultClient) ReadYaml(secretName string) (string, error)

ReadYaml a secret from vault

func (FakeVaultClient) ReplaceURIs

func (f FakeVaultClient) ReplaceURIs(text string) (string, error)

ReplaceURIs corrects the URIs

func (FakeVaultClient) Write

func (f FakeVaultClient) Write(secretName string, data map[string]interface{}) (map[string]interface{}, error)

Write a secret to vault

func (FakeVaultClient) WriteObject

func (f FakeVaultClient) WriteObject(secretName string, secret interface{}) (map[string]interface{}, error)

WriteObject a secret to vault

func (FakeVaultClient) WriteYaml

func (f FakeVaultClient) WriteYaml(secretName string, y string) (map[string]interface{}, error)

WriteYaml a secret to vault

Jump to

Keyboard shortcuts

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