bbolt

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package bbolt provides a BBolt-backed storage repository.

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 implements storage.Repository backed by a BBolt database.

func NewRepository

func NewRepository(db *bbolt.DB) *Store

NewRepository returns a Repository backed by the given BBolt database.

func NewRepositoryFromFile

func NewRepositoryFromFile(path string, options *bbolt.Options) (*Store, error)

NewRepositoryFromFile opens a BBolt database at the given path and returns a new Repository.

func (*Store) Batch

func (s *Store) Batch(vaultID string, fn func(tx storage.BatchTx) error) error

func (*Store) Close

func (s *Store) Close() error

Close closes the underlying BBolt database.

func (*Store) Delete

func (s *Store) Delete(vaultID, recordType, recordID string) error

func (*Store) DeleteVault

func (s *Store) DeleteVault(vaultID string) error

func (*Store) Get

func (s *Store) Get(vaultID, recordType, recordID string) (*storage.Envelope, error)

func (*Store) List

func (s *Store) List(vaultID, recordType string) ([]string, error)

func (*Store) ListVaults

func (s *Store) ListVaults() ([]string, error)

func (*Store) Put

func (s *Store) Put(vaultID, recordType, recordID string, envelope *storage.Envelope) error

func (*Store) PutCAS

func (s *Store) PutCAS(vaultID, recordType, recordID string, expectedVersion uint64, envelope *storage.Envelope) error

Jump to

Keyboard shortcuts

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