Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CapabilityLevel ¶
type CapabilityLevel int
CapabilityLevel mirrors src/main/java/.../intelligence/CapabilityLevel.java. Used by language extractors to describe how thoroughly a feature/language is covered. Distinct from Confidence (per-edge confidence ladder) — capability is a property of an *extractor*, not a single fact.
const ( // CapabilityExact - full semantic understanding (AST-level, cross-file). CapabilityExact CapabilityLevel = iota // CapabilityPartial - some constructs detected, others may be missed. CapabilityPartial // CapabilityLexicalOnly - lexical/text search only, no structural analysis. CapabilityLexicalOnly // CapabilityUnsupported - language or feature is not supported. CapabilityUnsupported )
func ParseCapabilityLevel ¶
func ParseCapabilityLevel(s string) (CapabilityLevel, error)
ParseCapabilityLevel is case-insensitive.
func (CapabilityLevel) MarshalJSON ¶
func (c CapabilityLevel) MarshalJSON() ([]byte, error)
func (CapabilityLevel) String ¶
func (c CapabilityLevel) String() string
func (*CapabilityLevel) UnmarshalJSON ¶
func (c *CapabilityLevel) UnmarshalJSON(data []byte) error
type CodeEdge ¶
type CodeEdge struct {
ID string `json:"id"`
Kind EdgeKind `json:"kind"`
SourceID string `json:"source_id"`
TargetID string `json:"target_id"`
Confidence Confidence `json:"confidence"`
Source string `json:"source,omitempty"`
Properties map[string]any `json:"properties"`
}
CodeEdge mirrors src/main/java/.../model/CodeEdge.java.
Unlike Java SDN, the Go side stores TargetID as a plain string, not a back-reference into a CodeNode. GraphBuilder reattaches edges to nodes during the flush phase.
type CodeNode ¶
type CodeNode struct {
ID string `json:"id"`
Kind NodeKind `json:"kind"`
Label string `json:"label"`
FQN string `json:"fqn,omitempty"`
Module string `json:"module,omitempty"`
FilePath string `json:"file_path,omitempty"`
LineStart int `json:"line_start,omitempty"`
LineEnd int `json:"line_end,omitempty"`
Layer Layer `json:"layer"`
Confidence Confidence `json:"confidence"`
Source string `json:"source,omitempty"`
Annotations []string `json:"annotations"`
Properties map[string]any `json:"properties"`
}
CodeNode mirrors src/main/java/.../model/CodeNode.java.
Field naming follows snake_case JSON for parity-diffing against a normalized SQLite dump. The Java side uses Jackson defaults (camelCase) but the parity harness normalizes both sides via a shared shape (see parity/normalize.go), so what matters is internal consistency on the Go side.
type Confidence ¶
type Confidence int
Confidence is the three-tier confidence ladder: pattern → structure → resolved. Values are ordered such that LEXICAL < SYNTACTIC < RESOLVED — direct integer comparison matches the Java Comparable contract.
const ( ConfidenceLexical Confidence = iota // regex / textual pattern only ConfidenceSyntactic // AST / parse tree match ConfidenceResolved // resolved via SymbolResolver )
func ParseConfidence ¶
func ParseConfidence(s string) (Confidence, error)
ParseConfidence is case-insensitive.
func (Confidence) MarshalJSON ¶
func (c Confidence) MarshalJSON() ([]byte, error)
func (Confidence) Score ¶
func (c Confidence) Score() float64
Score returns the canonical numeric mapping from the Java side: LEXICAL=0.6, SYNTACTIC=0.8, RESOLVED=0.95.
func (Confidence) String ¶
func (c Confidence) String() string
func (*Confidence) UnmarshalJSON ¶
func (c *Confidence) UnmarshalJSON(data []byte) error
type EdgeKind ¶
type EdgeKind int
EdgeKind enumerates the 28 edge types in the codeiq graph. String values MUST match the Java EdgeKind enum 1:1 (see src/main/java/io/github/randomcodespace/iq/model/EdgeKind.java).
const ( EdgeDependsOn EdgeKind = iota EdgeImports EdgeExtends EdgeImplements EdgeCalls EdgeInjects EdgeExposes EdgeQueries EdgeMapsTo EdgeProduces EdgeConsumes EdgePublishes EdgeListens EdgeInvokesRMI EdgeExportsRMI EdgeReadsConfig EdgeMigrates EdgeContains EdgeDefines EdgeOverrides EdgeConnectsTo EdgeTriggers EdgeProvisions EdgeSendsTo EdgeReceivesFrom EdgeProtects EdgeRenders EdgeReferencesTable )
func AllEdgeKinds ¶
func AllEdgeKinds() []EdgeKind
func ParseEdgeKind ¶
func (EdgeKind) MarshalJSON ¶
func (*EdgeKind) UnmarshalJSON ¶
type Layer ¶
type Layer int
Layer is the five-way layer classification stamped by LayerClassifier (phase 2). Phase 1 detectors emit LayerUnknown; classification is deferred to phase 2's analyzer.LayerClassifier.
func ParseLayer ¶
func (Layer) MarshalJSON ¶
func (*Layer) UnmarshalJSON ¶
type NodeKind ¶
type NodeKind int
NodeKind enumerates the 34 node types in the codeiq graph. String values MUST match the Java NodeKind enum 1:1 (see src/main/java/io/github/randomcodespace/iq/model/NodeKind.java).
const ( NodeModule NodeKind = iota NodePackage NodeClass NodeMethod NodeEndpoint NodeEntity NodeRepository NodeQuery NodeMigration NodeTopic NodeQueue NodeEvent NodeRMIInterface NodeConfigFile NodeConfigKey NodeWebSocketEndpoint NodeInterface NodeAbstractClass NodeEnum NodeAnnotationType NodeProtocolMessage NodeConfigDefinition NodeDatabaseConnection NodeAzureResource NodeAzureFunction NodeMessageQueue NodeInfraResource NodeComponent NodeGuard NodeMiddleware NodeHook NodeService NodeExternal NodeSQLEntity )
func AllNodeKinds ¶
func AllNodeKinds() []NodeKind
AllNodeKinds returns every NodeKind in declaration order.
func ParseNodeKind ¶
ParseNodeKind looks up a NodeKind by its canonical string value.
func (NodeKind) MarshalJSON ¶
MarshalJSON emits the canonical string value.
func (*NodeKind) UnmarshalJSON ¶
UnmarshalJSON parses the canonical string value.