Documentation
¶
Index ¶
- func MarshalTargets(names []string) string
- func OpenDB(dbURL string) (*gorm.DB, error)
- type ContentCache
- func (cc *ContentCache) Count() (int64, error)
- func (cc *ContentCache) DeleteOrphanedContent(activeRepos []string) error
- func (cc *ContentCache) ListDocs(repoName string) ([]corecontent.DocRecord, error)
- func (cc *ContentCache) NeedsUpdate(repoName, path, sha string) bool
- func (cc *ContentCache) Search(query, repoName, fileType string) ([]corecontent.ContentMatch, error)
- func (cc *ContentCache) SearchMode() string
- func (cc *ContentCache) Upsert(repoName, path, sha, content, fileType string) error
- type DBAuditStore
- type GraphRepo
- func (r *GraphRepo) AddObservations(observations []coregraph.Observation) ([]coregraph.Observation, error)
- func (r *GraphRepo) CreateEntities(entities []coregraph.Entity) ([]coregraph.Entity, error)
- func (r *GraphRepo) CreateRelations(relations []coregraph.Relation) ([]coregraph.Relation, error)
- func (r *GraphRepo) DeleteEntities(entityNames []string) error
- func (r *GraphRepo) DeleteObservations(deletions []coregraph.Observation) error
- func (r *GraphRepo) DeleteRelations(relations []coregraph.Relation) error
- func (r *GraphRepo) EntityCount() (int64, error)
- func (r *GraphRepo) EntityTypeCounts() (map[string]int64, error)
- func (r *GraphRepo) FindPath(from, to string, maxDepth int) ([]coregraph.PathEdge, error)
- func (r *GraphRepo) GetIntegrationMap(_ context.Context, service string, depth int) (coregraph.IntegrationMap, error)
- func (r *GraphRepo) ListEntities(entityType string) (coregraph.KnowledgeGraph, error)
- func (r *GraphRepo) ListRelations(relationType, fromEntity string) ([]coregraph.Relation, error)
- func (r *GraphRepo) OpenNodes(names []string) (coregraph.KnowledgeGraph, error)
- func (r *GraphRepo) OpenNodesFiltered(names []string, includeArchived bool) (coregraph.KnowledgeGraph, error)
- func (r *GraphRepo) ReadGraph() (coregraph.KnowledgeGraph, error)
- func (r *GraphRepo) SearchNodes(query string) (coregraph.KnowledgeGraph, error)
- func (r *GraphRepo) SearchNodesFiltered(query string, includeArchived bool) (coregraph.KnowledgeGraph, error)
- func (r *GraphRepo) TraverseGraph(entity, relationType, direction string, maxDepth int) ([]coregraph.TraverseNode, []coregraph.TraverseEdge, error)
- func (r *GraphRepo) UpdateEntity(oldName, newName, newType string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalTargets ¶
MarshalTargets serialises a slice of entity/relation names to a JSON string.
Types ¶
type ContentCache ¶
type ContentCache struct {
// contains filtered or unexported fields
}
func NewContentCache ¶
func NewContentCache(db *gorm.DB, enabled bool, maxSize int) *ContentCache
func (*ContentCache) Count ¶
func (cc *ContentCache) Count() (int64, error)
func (*ContentCache) DeleteOrphanedContent ¶
func (cc *ContentCache) DeleteOrphanedContent(activeRepos []string) error
func (*ContentCache) ListDocs ¶
func (cc *ContentCache) ListDocs(repoName string) ([]corecontent.DocRecord, error)
func (*ContentCache) NeedsUpdate ¶
func (cc *ContentCache) NeedsUpdate(repoName, path, sha string) bool
func (*ContentCache) Search ¶
func (cc *ContentCache) Search(query, repoName, fileType string) ([]corecontent.ContentMatch, error)
func (*ContentCache) SearchMode ¶
func (cc *ContentCache) SearchMode() string
func (*ContentCache) Upsert ¶
func (cc *ContentCache) Upsert(repoName, path, sha, content, fileType string) error
type DBAuditStore ¶
type DBAuditStore struct {
// contains filtered or unexported fields
}
DBAuditStore is the SQLite/Postgres implementation of coreaudit.AuditStore.
func NewAuditStore ¶
func NewAuditStore(db *gorm.DB) (*DBAuditStore, error)
NewAuditStore creates the audit_events table (if absent) and returns a store.
func (*DBAuditStore) Query ¶
func (s *DBAuditStore) Query(_ context.Context, f coreaudit.AuditFilter) ([]coreaudit.AuditEvent, int64, error)
Query retrieves audit events matching the filter. Returns the page and total count.
func (*DBAuditStore) Summary ¶
func (s *DBAuditStore) Summary(_ context.Context, window time.Duration) (coreaudit.AuditSummary, error)
Summary returns anomaly-focused metrics over the given rolling window.
func (*DBAuditStore) Write ¶
func (s *DBAuditStore) Write(_ context.Context, e coreaudit.AuditEvent) error
Write persists one audit event. A UUIDv7 primary key is generated here so ORDER BY id gives chronological order without an extra index.
type GraphRepo ¶
type GraphRepo struct {
// contains filtered or unexported fields
}
GraphRepo is the GORM implementation of core/graph.GraphRepository.
func NewGraphRepo ¶
NewGraphRepo creates a GraphRepo backed by db.
func (*GraphRepo) AddObservations ¶
func (r *GraphRepo) AddObservations(observations []coregraph.Observation) ([]coregraph.Observation, error)
func (*GraphRepo) CreateEntities ¶
func (*GraphRepo) CreateRelations ¶
func (*GraphRepo) DeleteEntities ¶
func (*GraphRepo) DeleteObservations ¶
func (r *GraphRepo) DeleteObservations(deletions []coregraph.Observation) error
func (*GraphRepo) DeleteRelations ¶
func (*GraphRepo) EntityCount ¶
func (*GraphRepo) EntityTypeCounts ¶
func (*GraphRepo) GetIntegrationMap ¶
func (*GraphRepo) ListEntities ¶
func (r *GraphRepo) ListEntities(entityType string) (coregraph.KnowledgeGraph, error)
func (*GraphRepo) ListRelations ¶
func (*GraphRepo) OpenNodes ¶
func (r *GraphRepo) OpenNodes(names []string) (coregraph.KnowledgeGraph, error)
func (*GraphRepo) OpenNodesFiltered ¶
func (*GraphRepo) SearchNodes ¶
func (r *GraphRepo) SearchNodes(query string) (coregraph.KnowledgeGraph, error)
func (*GraphRepo) SearchNodesFiltered ¶
func (*GraphRepo) TraverseGraph ¶
func (r *GraphRepo) TraverseGraph(entity, relationType, direction string, maxDepth int) ([]coregraph.TraverseNode, []coregraph.TraverseEdge, error)
func (*GraphRepo) UpdateEntity ¶
Click to show internal directories.
Click to hide internal directories.