Documentation ¶
Index ¶
- type FakeVaultServer
- func (s *FakeVaultServer) ConfigureClient(clientConfig *vaultapi.Config)
- func (s *FakeVaultServer) ExpectGithubLogin(githubToken string, vaultToken string)
- func (s *FakeVaultServer) GetSecret(path string) map[string]interface{}
- func (s *FakeVaultServer) NewClient() *vaultapi.Client
- func (s *FakeVaultServer) Server() *httptest.Server
- func (s *FakeVaultServer) SetSecret(path string, data map[string]interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeVaultServer ¶
type FakeVaultServer struct {
// contains filtered or unexported fields
}
func NewFakeVaultServer ¶
func NewFakeVaultServer(t *testing.T) *FakeVaultServer
NewFakeVaultServer returns a new fake vault server that can be used to fake vault secret lookups
func (*FakeVaultServer) ConfigureClient ¶
func (s *FakeVaultServer) ConfigureClient(clientConfig *vaultapi.Config)
ConfigureClient can be used to configure a vault client to talk to this fake vault server instance
func (*FakeVaultServer) ExpectGithubLogin ¶
func (s *FakeVaultServer) ExpectGithubLogin(githubToken string, vaultToken string)
ExpectGithubLogin configures the server to expect a github login with a specific Github token (by default any token is expected)
func (*FakeVaultServer) GetSecret ¶
func (s *FakeVaultServer) GetSecret(path string) map[string]interface{}
GetSecret retrieves a secret from the fake server's storage
func (*FakeVaultServer) NewClient ¶
func (s *FakeVaultServer) NewClient() *vaultapi.Client
NewClient return a new vault client configured to talk to this fake vault server instance
func (*FakeVaultServer) Server ¶
func (s *FakeVaultServer) Server() *httptest.Server
Server returns the underlying httptest.Server associated with this fake vault server instance
func (*FakeVaultServer) SetSecret ¶
func (s *FakeVaultServer) SetSecret(path string, data map[string]interface{})
SetSecret adds a secret to the fake server
Click to show internal directories.
Click to hide internal directories.