Documentation
¶
Overview ¶
Package entity implements entity extraction and linking for Cortex.
It extracts files, URLs, packages, symbols, and concepts from observation content using regex patterns and stores them as entity links.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Extract ¶
func Extract(obs *domain.Observation) []*domain.EntityLink
Extract extracts all entity links from an observation's content.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service handles entity extraction and storage.
func NewService ¶
func NewService(repo domain.EntityRepository) *Service
NewService creates a new entity service.
func (*Service) ExtractAndSave ¶
ExtractAndSave extracts entities from an observation and saves the links.
func (*Service) FindByEntity ¶
func (s *Service) FindByEntity(ctx context.Context, entityType, entityValue string) ([]*domain.EntityLink, error)
FindByEntity returns observations referencing a specific entity.
func (*Service) GetByObservation ¶
GetByObservation returns entity links for an observation.
Click to show internal directories.
Click to hide internal directories.