vectorstore

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Finding

type Finding struct {
	ID          int64
	FilePath    string
	LineNumber  int
	CodeSnippet string
	Embedding   []float32
	PatternType string
	Entropy     float64
	Confidence  string
	Verified    bool
	Timestamp   int64
}

Finding represents a secret finding with its embedding

type VectorStore

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

VectorStore handles storage and retrieval of embeddings

func NewVectorStore

func NewVectorStore(dbPath string, enabled bool, ephemeral bool) (*VectorStore, error)

NewVectorStore creates a new vector store

func (*VectorStore) Close

func (vs *VectorStore) Close() error

Close closes the database connection and cleans up ephemeral storage.

func (*VectorStore) MarkVerified

func (vs *VectorStore) MarkVerified(id int64, verified bool) error

MarkVerified marks a finding as verified

func (*VectorStore) Search

func (vs *VectorStore) Search(embedding []float32, topK int, threshold float32) ([]*Finding, error)

Search finds similar findings using cosine similarity

func (*VectorStore) Store

func (vs *VectorStore) Store(finding *Finding) error

Store saves a finding with its embedding

Jump to

Keyboard shortcuts

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