Documentation
¶
Overview ¶
Package memory provides an in-memory vault implementation. This is primarily useful for testing and development.
Usage:
v := memory.New()
v.Set(ctx, "my-secret", &vault.Secret{Value: "secret-value"})
secret, err := v.Get(ctx, "my-secret")
Index ¶
- type Provider
- func (p *Provider) Capabilities() vault.Capabilities
- func (p *Provider) Clear()
- func (p *Provider) Close() error
- func (p *Provider) Count() int
- func (p *Provider) Delete(ctx context.Context, path string) error
- func (p *Provider) Exists(ctx context.Context, path string) (bool, error)
- func (p *Provider) Get(ctx context.Context, path string) (*vault.Secret, error)
- func (p *Provider) List(ctx context.Context, prefix string) ([]string, error)
- func (p *Provider) Name() string
- func (p *Provider) Set(ctx context.Context, path string, secret *vault.Secret) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements vault.Vault with in-memory storage.
func NewWithSecrets ¶
NewWithSecrets creates a new in-memory provider pre-populated with secrets.
func (*Provider) Capabilities ¶
func (p *Provider) Capabilities() vault.Capabilities
Capabilities returns the provider capabilities.
Click to show internal directories.
Click to hide internal directories.