graph Types

This document shows Go type definitions from the codebase.

Generated types:

AxGraphBuilder {#axgraphbuilder}

Source: graph/builder.go:12

type AxGraphBuilder struct {
}

Claim {#claim}

Source: graph/graph_build.go:181

type Claim struct {
	Subject string
	Predicate string
	Context string
	Actor string
	Timestamp string
}

Graph {#graph}

Source: graph/models.go:8

type Graph struct {
	Nodes []Node `json:"nodes"`
	Links []Link `json:"links"`
	Meta Meta `json:"meta"`
}

Link {#link}

Source: graph/models.go:26

type Link struct {
	Source string `json:"source"`
	Target string `json:"target"`
	Type string `json:"type"`
	Weight float64 `json:"value"`
	Label string `json:"label,omitempty"`
	Hidden bool `json:"hidden,omitempty"`
}

Meta {#meta}

Source: graph/models.go:36

type Meta struct {
	GeneratedAt time.Time `json:"generated_at"`
	Stats Stats `json:"stats"`
	Config map[string]string `json:"config"`
	NodeTypes []NodeTypeInfo `json:"node_types"`
	RelationshipTypes []RelationshipTypeInfo `json:"relationship_types"`
}

Node {#node}

Source: graph/models.go:15

type Node struct {
	ID string `json:"id"`
	Type string `json:"type"`
	TypeSource string `json:"-"`
	Label string `json:"label"`
	Visible bool `json:"visible"`
	Group int `json:"group,omitempty"`
	Metadata map[string]interface{} `json:"metadata,omitempty"`
}

NodeTypeInfo {#nodetypeinfo}

Source: graph/models.go:45

type NodeTypeInfo struct {
	Type string `json:"type"`
	Label string `json:"label"`
	Color string `json:"color,omitempty"`
	Count int `json:"count,omitempty"`
}

RelationshipDefinition {#relationshipdefinition}

Source: graph/relationship_types.go:11

type RelationshipDefinition struct {
	PredicateName string
	DisplayLabel string
	Color string
	LinkDistance *float64
	LinkStrength *float64
	Deprecated bool
}

RelationshipTypeInfo {#relationshiptypeinfo}

Source: graph/models.go:53

type RelationshipTypeInfo struct {
	Type string `json:"type"`
	Label string `json:"label"`
	Color string `json:"color,omitempty"`
	LinkDistance *float64 `json:"link_distance,omitempty"`
	LinkStrength *float64 `json:"link_strength,omitempty"`
	Count int `json:"count,omitempty"`
}

Stats {#stats}

Source: graph/models.go:63

type Stats struct {
	TotalNodes int `json:"total_nodes,omitempty"`
	TotalEdges int `json:"total_edges,omitempty"`
}

TypeDefinition {#typedefinition}

Source: graph/node_types.go:11

type TypeDefinition struct {
	TypeName string
	DisplayColor string
	DisplayLabel string
	Deprecated bool
	Opacity float64
}