pebble

package
v0.0.0-...-5f8ca62 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

func NewStorage

func NewStorage(path string) (*Storage, error)

NewStorage initializes a new Storage instance with a database at the given path

func (*Storage) Close

func (p *Storage) Close() error

Close closes the database connection and returns an error if any issue occurs during the operation

func (*Storage) Delete

func (p *Storage) Delete(key []byte) error

Delete removes the key from the key-value data store.

func (*Storage) Get

func (p *Storage) Get(key []byte) ([]byte, error)

Get retrieves the value for a given key and returns an error if any issue occurs during the operation

func (*Storage) Has

func (p *Storage) Has(key []byte) (bool, error)

Has retrieves if a key is present in the key-value data store.

func (*Storage) Put

func (p *Storage) Put(key []byte, value []byte) error

Put inserts the given value into the key-value data store.

Jump to

Keyboard shortcuts

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