Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RootCause ¶
RootCause holds the schema definition for the RootCause entity, mirroring rootcause.RootCause (github.com/plexusone/signal-spec/pkg/rootcause) minus its Embedding field, which lives in the rootcause_vec vec0 table instead (see the Signal schema's doc comment for why). SignalIDs is also not stored here — it's derived at read time from SignalRootCauseLink so it can't drift out of sync with the actual links.
type Signal ¶
Signal holds the schema definition for the Signal entity, mirroring signal.Signal (github.com/plexusone/signal-spec/pkg/signal) minus its Embedding field, which lives in the signal_vec vec0 table instead — Ent has no concept of SQLite virtual tables, so the two are kept separate and joined on id, the same way aha-studio keeps FTS5 tables alongside Ent.
type SignalRootCauseLink ¶
SignalRootCauseLink holds the schema definition for the link between a Signal and the RootCause it's attached to.
This is a dedicated table rather than a root_cause_id column on Signal because consolidate.Pipeline calls Store.LinkSignal(sig.ID, rc.ID) (consolidate/consolidate.go processRaw/Attach) without ever calling SaveSignal first — a column on Signal would silently no-op the link for signals that were never explicitly persisted. The unique index on signal_id makes LinkSignal an upsert (insert or re-point on conflict), which also models reattachment cleanly: reject -> re-review -> re-link moves the pointer instead of accumulating duplicate links.
func (SignalRootCauseLink) Fields ¶
func (SignalRootCauseLink) Fields() []ent.Field
Fields of the SignalRootCauseLink.
func (SignalRootCauseLink) Indexes ¶
func (SignalRootCauseLink) Indexes() []ent.Index
Indexes of the SignalRootCauseLink.