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 `json:"subject"`
	Predicate string `json:"predicate"`
	Context string `json:"context"`
	Actor string `json:"actor"`
	Timestamp string `json:"timestamp"`
}

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:46

type NodeTypeInfo struct {
	Type string `json:"type"`
	Label string `json:"label"`
	Color string `json:"color,omitempty"`
	Count int `json:"count,omitempty"`
	RichStringFields []string `json:"rich_string_fields,omitempty"`
	ArrayFields []string `json:"array_fields,omitempty"`
	Opacity *float64 `json:"opacity,omitempty"`
	Deprecated bool `json:"deprecated,omitempty"`
}

RelationshipDefinition {#relationshipdefinition}

Source: graph/relationship_types.go:12

type RelationshipDefinition struct {
	PredicateName string `json:"predicate_name"`
	DisplayLabel string `json:"display_label" attr:"display_label"`
	Color string `json:"color,omitempty" attr:"color,omitempty"`
	LinkDistance *float64 `json:"link_distance,omitempty" attr:"link_distance,omitempty"`
	LinkStrength *float64 `json:"link_strength,omitempty" attr:"link_strength,omitempty"`
	Deprecated bool `json:"deprecated" attr:"deprecated"`
}

RelationshipTypeInfo {#relationshiptypeinfo}

Source: graph/models.go:59

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:69

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