memoryvault

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package memoryvault provides an in-memory implementation of [secrets.Vault] for development and testing. All data is stored in a simple map protected by a read-write mutex and is lost when the process exits.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Vault

type Vault struct {
	// contains filtered or unexported fields
}

Vault is an in-memory implementation of secrets.Vault for development and testing.

func New

func New() *Vault

New creates a new in-memory vault.

func (*Vault) Delete

func (v *Vault) Delete(_ context.Context, key string) error

Delete removes a secret from memory.

func (*Vault) Retrieve

func (v *Vault) Retrieve(_ context.Context, key string) ([]byte, error)

Retrieve returns a secret value from memory.

func (*Vault) Rotate

func (v *Vault) Rotate(_ context.Context, _ string) error

Rotate is a no-op for the in-memory vault. Real implementations would generate a new encryption key version and re-encrypt stored values.

func (*Vault) Store

func (v *Vault) Store(_ context.Context, key string, value []byte) error

Store persists a secret value in memory.

Jump to

Keyboard shortcuts

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