memory

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// ReadinessError, when non-nil, makes CheckReadiness return it (after policy checks).
	ReadinessError error
	// SimulateDurable treats the store as durable-ready for mandatory audit/durable policy gates.
	SimulateDurable bool
}

Options configures the in-memory store (testing and non-durable runtime).

type Store

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

Store is a race-safe in-memory implementation of app.Store.

func New

func New(opts Options) *Store

New returns an empty in-memory secure-session store.

func (*Store) AddUsage

func (s *Store) AddUsage(ctx context.Context, delta domain.UsageDelta) error

func (*Store) AppendAttemptTrace

func (s *Store) AppendAttemptTrace(ctx context.Context, trace domain.AttemptTrace) error

func (*Store) AppendAudit

func (s *Store) AppendAudit(ctx context.Context, item domain.AuditItem) error

func (*Store) AppendTranscript

func (s *Store) AppendTranscript(ctx context.Context, item domain.TranscriptItem) error

func (*Store) Audit

func (*Store) CheckReadiness

func (s *Store) CheckReadiness(ctx context.Context, policy domain.PolicyMetadata) error

func (*Store) ListAttemptEvidence

func (s *Store) ListAttemptEvidence(ctx context.Context, id domain.SessionID, opts domain.ReadOptions) ([]domain.AttemptEvidence, error)

func (*Store) LoadByALegID

func (s *Store) LoadByALegID(ctx context.Context, aLegID string) (domain.Record, error)

func (*Store) LoadByID

func (s *Store) LoadByID(ctx context.Context, id domain.SessionID) (domain.Record, error)

func (*Store) LoadByResumeFingerprint

func (s *Store) LoadByResumeFingerprint(ctx context.Context, fp domain.TokenFingerprint) (domain.Record, error)

func (*Store) NextAuditSeq

func (s *Store) NextAuditSeq(ctx context.Context, id domain.SessionID) (int64, error)

func (*Store) NextTranscriptSeq

func (s *Store) NextTranscriptSeq(ctx context.Context, id domain.SessionID) (int64, error)

func (*Store) Quarantine

func (s *Store) Quarantine(ctx context.Context, in domain.QuarantineInput) error

Quarantine marks a session terminal and appends a secret_guard blocked audit row.

func (*Store) Summary

func (s *Store) Summary(ctx context.Context, query domain.SummaryQuery) ([]domain.Summary, error)

func (*Store) TouchActivity

func (s *Store) TouchActivity(ctx context.Context, id domain.SessionID, at time.Time, source domain.ActivitySource) error

func (*Store) Transcript

func (s *Store) Transcript(ctx context.Context, id domain.SessionID, opts domain.ReadOptions) ([]domain.TranscriptItem, error)

func (*Store) UpdateAttemptOutcome

func (s *Store) UpdateAttemptOutcome(ctx context.Context, outcome domain.AttemptOutcome) error

Jump to

Keyboard shortcuts

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