securestore

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package securestore provides a small abstraction for secret storage.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("secure store value not found")

ErrNotFound indicates that a profile has no value for an account key.

Functions

This section is empty.

Types

type KeyringStore

type KeyringStore struct{}

KeyringStore stores values in the operating system keyring.

func (KeyringStore) Delete

func (KeyringStore) Delete(profile, key string) error

func (KeyringStore) Get

func (KeyringStore) Get(profile, key string) ([]byte, error)

func (KeyringStore) Set

func (KeyringStore) Set(profile, key string, value []byte) error

type MemoryStore

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

MemoryStore is an in-memory Store intended for deterministic tests.

func NewMemoryStore

func NewMemoryStore() *MemoryStore

NewMemoryStore creates an empty MemoryStore.

func (*MemoryStore) Delete

func (s *MemoryStore) Delete(profile, key string) error

func (*MemoryStore) Get

func (s *MemoryStore) Get(profile, key string) ([]byte, error)

func (*MemoryStore) Set

func (s *MemoryStore) Set(profile, key string, value []byte) error

type Store

type Store interface {
	Get(profile, key string) ([]byte, error)
	Set(profile, key string, value []byte) error
	Delete(profile, key string) error
}

Store stores secrets by profile-scoped account key.

Jump to

Keyboard shortcuts

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