helpers

package
v1.18.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Backend

func Backend(c *logical.BackendConfig) *backend

func CreateTestAppRoleVault

func CreateTestAppRoleVault(t *testing.T) (*vault.TestCluster, string, string)

CreateTestAppRoleVault initializes a new test vault with AppRole and Kv v2

func CreateTestAuthVault

func CreateTestAuthVault(t *testing.T) *vault.TestCluster

CreateTestGithubVault initializes a new test vault with AppRole and Kv v2

func CreateTestUserPassVault added in v1.13.0

func CreateTestUserPassVault(t *testing.T) (*vault.TestCluster, string, string)

CreateTestUserPassVault initializes a new test vault with UserPass and Kv v2

func CreateTestVault

func CreateTestVault(t *testing.T) (net.Listener, *api.Client, string)

CreateTestVault initializes a test vault with kv v2

Types

type MockVault

type MockVault struct {
	GetSecretsCalled          bool
	GetIndividualSecretCalled bool
	Data                      []map[string]interface{}
}

MockVault is used to mock out a generic SM Backend It's useful for testing replacement behavior

func (*MockVault) GetIndividualSecret

func (v *MockVault) GetIndividualSecret(path, secret, version string, annotations map[string]string) (interface{}, error)

func (*MockVault) GetSecrets

func (v *MockVault) GetSecrets(path string, version string, annotations map[string]string) (map[string]interface{}, error)

func (*MockVault) LoadData

func (v *MockVault) LoadData(data map[string]interface{})

func (*MockVault) Login

func (v *MockVault) Login() error

Jump to

Keyboard shortcuts

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