keystore

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package keystore is the durable keys.Store, on top of internal/state.

It lives outside pkg/keys because it adapts the service's own storage, not the key format: pkg/keys is a public reference implementation (decisions.md #26) and must not name internal types in its API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store is a keys.Store backed by durable state.

func New

func New(st state.Store, clock keys.Clock) *Store

New returns a Store persisting to st. A nil clock is the system clock.

func (*Store) GetRK

func (s *Store) GetRK(ctx context.Context, spaceID string) (keys.WrappedDK, error)

GetRK returns the RK-wrapped DK for a space.

func (*Store) GetSRW

func (s *Store) GetSRW(ctx context.Context, spaceID string) (keys.WrappedDK, error)

GetSRW returns the SRW-wrapped DK for a space.

func (*Store) PutRK

func (s *Store) PutRK(ctx context.Context, spaceID string, w keys.WrappedDK) error

PutRK stores the RK-wrapped DK for a space.

func (*Store) PutSRW

func (s *Store) PutSRW(ctx context.Context, spaceID string, w keys.WrappedDK) error

PutSRW stores the SRW-wrapped DK for a space.

func (*Store) Spaces

func (s *Store) Spaces(ctx context.Context) ([]string, error)

Spaces returns the ids of every space holding an envelope, in order. It reads no documents: the ids are in the keys.

func (*Store) Status

func (s *Store) Status(ctx context.Context, spaceID string) (keys.Status, error)

Status reports setup state for a space without revealing key material.

Jump to

Keyboard shortcuts

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