Documentation
¶
Overview ¶
Package entity implements the SQLite entity link store for Cortex.
Index ¶
- type Store
- func (s *Store) DeleteByObservation(ctx context.Context, obsID int64) error
- func (s *Store) FindByEntity(ctx context.Context, entityType, entityValue string) ([]*domain.EntityLink, error)
- func (s *Store) FindByEntityScoped(ctx context.Context, ...) ([]*domain.EntityLink, error)
- func (s *Store) GetByObservation(ctx context.Context, obsID int64) ([]*domain.EntityLink, error)
- func (s *Store) SaveLinks(ctx context.Context, links []*domain.EntityLink) error
- func (s *Store) SaveLinksInTx(ctx context.Context, links []*domain.EntityLink) error
- func (s *Store) WithinTx(ctx context.Context, handle any, fn func(context.Context) error) error
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 (*Store) DeleteByObservation ¶
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) FindByEntityScoped ¶
func (s *Store) FindByEntityScoped(ctx context.Context, entityType, entityValue, tenantID, workspaceID, project string) ([]*domain.EntityLink, error)
FindByEntityScoped applies tenant, workspace, and project isolation while retaining the legacy unscoped API for local mode.
func (*Store) GetByObservation ¶
GetByObservation retrieves all entity links for an observation.
func (*Store) SaveLinksInTx ¶
SaveLinksInTx is the explicit atomic-save seam used by UnitOfWork callers.
Click to show internal directories.
Click to hide internal directories.