storage

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2025 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 BadgerStore

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

func NewBadgerStore

func NewBadgerStore(path string) (*BadgerStore, error)

func (*BadgerStore) Close

func (s *BadgerStore) Close()

func (*BadgerStore) Delete

func (s *BadgerStore) Delete(ctx context.Context, key string) error

func (*BadgerStore) Get

func (s *BadgerStore) Get(ctx context.Context, key string) ([]byte, error)

func (*BadgerStore) GetAllEmbeddings

func (s *BadgerStore) GetAllEmbeddings(ctx context.Context) (map[string][]byte, error)

func (*BadgerStore) GetPrompt

func (s *BadgerStore) GetPrompt(ctx context.Context, key string) (string, error)

func (*BadgerStore) Set

func (s *BadgerStore) Set(ctx context.Context, key string, value []byte) error

type Storage

type Storage interface {
	Set(ctx context.Context, key string, value []byte) error
	Get(ctx context.Context, key string) ([]byte, error)
	Delete(ctx context.Context, key string) error
	GetAllEmbeddings(ctx context.Context) (map[string][]byte, error)
	GetPrompt(ctx context.Context, key string) (string, error)
	Close()
}

Jump to

Keyboard shortcuts

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