securestore

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package securestore provides small immutable files in an owner-only directory.

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 holds a validated directory descriptor for no-follow file operations.

func Open

func Open(path string, create bool, label string) (*Store, error)

Open opens or creates an owner-only directory.

func (*Store) AliasesDirectory

func (s *Store) AliasesDirectory(candidate *os.File) (bool, error)

AliasesDirectory reports whether candidate is this store's held directory.

func (*Store) Close

func (s *Store) Close() error

Close releases the held directory descriptor.

func (*Store) Create

func (s *Store) Create(name string, data []byte) error

Create writes and syncs a new immutable owner-only file.

func (*Store) Delete

func (s *Store) Delete(name string) error

Delete durably removes one secure value.

func (*Store) Read

func (s *Store) Read(name string) ([]byte, error)

Read reads one validated owner-only file with a fixed memory bound.

func (*Store) Replace

func (s *Store) Replace(name string, data []byte) error

Replace atomically writes and syncs an owner-only value. The destination is selected relative to the already-validated directory descriptor.

Jump to

Keyboard shortcuts

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