graphize

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package graphize provides integration with the graphize code graph tool. It converts system-spec documents into graphfs nodes and edges, allowing infrastructure topology to be queried alongside code graphs.

Index

Constants

View Source
const (
	NodeTypeService   = "service"
	NodeTypeDatabase  = "database"
	NodeTypeQueue     = "queue"
	NodeTypeTopic     = "topic"
	NodeTypeStorage   = "storage"
	NodeTypeAIModel   = "ai_model"
	NodeTypeCDN       = "cdn"
	NodeTypeWorker    = "worker"
	NodeTypeHelm      = "helm_chart"
	NodeTypeTerraform = "terraform_module"
	NodeTypeSystem    = "system"
)

Node types for system-spec entities

View Source
const (
	EdgeTypeConnectsTo = "connects_to"
	EdgeTypeUses       = "uses"
	EdgeTypeDeploys    = "deploys"
	EdgeTypeManages    = "manages"
	EdgeTypeContains   = "contains"
	EdgeTypeLinksTo    = "links_to" // service -> repo
)

Edge types for system-spec relationships

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct{}

Provider extracts graphfs nodes and edges from system-spec documents.

func NewProvider

func NewProvider() *Provider

NewProvider creates a new system-spec provider.

func (*Provider) CanExtract

func (p *Provider) CanExtract(path string) bool

CanExtract returns true if the file is a system-spec document.

func (*Provider) Extensions

func (p *Provider) Extensions() []string

Extensions returns file extensions this provider handles.

func (*Provider) ExtractFile

func (p *Provider) ExtractFile(path, baseDir string) ([]*graph.Node, []*graph.Edge, error)

ExtractFile extracts nodes and edges from a system-spec JSON file.

func (*Provider) ExtractSystem

func (p *Provider) ExtractSystem(sys *spec.System, sourcePath string) ([]*graph.Node, []*graph.Edge, error)

ExtractSystem extracts nodes and edges from a System struct.

func (*Provider) Language

func (p *Provider) Language() string

Language returns the provider identifier.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL