entity

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package entity implements the SQLite entity link store for Cortex.

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 the SQLite entity link store.

func NewStore

func NewStore(db *sql.DB) *Store

NewStore creates a new entity store.

func (*Store) DeleteByObservation

func (s *Store) DeleteByObservation(ctx context.Context, obsID int64) error

DeleteByObservation removes all entity links for an observation.

func (*Store) FindByEntity

func (s *Store) FindByEntity(ctx context.Context, entityType, entityValue string) ([]*domain.EntityLink, error)

FindByEntity retrieves entity links matching a type and value.

func (*Store) GetByObservation

func (s *Store) GetByObservation(ctx context.Context, obsID int64) ([]*domain.EntityLink, error)

GetByObservation retrieves all entity links for an observation.

func (s *Store) SaveLinks(ctx context.Context, links []*domain.EntityLink) error

SaveLinks stores entity links, ignoring duplicates.

Jump to

Keyboard shortcuts

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