Class: Archsight::Import::Handlers::GoGrapher
- Inherits:
-
Grapher
- Object
- Archsight::Import::Handler
- Grapher
- Archsight::Import::Handlers::GoGrapher
- Defined in:
- lib/archsight/import/handlers/go_grapher.rb
Overview
GoGrapher handler - analyses a Go repository and generates a GraphViz DOT graph of its module/package structure, stored as architecture/modules on the TechnologyArtifact so it can be rendered in the frontend.
Configuration:
import/config/path - Path to the Go repository root (go.mod or go.work)
import/config/ranksep - Horizontal gap between rank columns (default: 0.6)
import/config/nodesep - Vertical gap between nodes in a column (default: 0.15)
Constant Summary
Constants inherited from Grapher
Archsight::Import::Handlers::Grapher::PALETTE
Instance Attribute Summary
Attributes inherited from Archsight::Import::Handler
#database, #import_resource, #progress, #resources_dir, #shared_writer
Class Method Summary collapse
Methods inherited from Grapher
#dot_graph, #execute, #safe_glob
Methods inherited from Archsight::Import::Handler
#compute_config_hash, #config, #config_all, #execute, #import_yaml, #initialize, #resource_yaml, #resources_to_yaml, #self_marker, #write_generates_meta, #write_yaml
Constructor Details
This class inherits a constructor from Archsight::Import::Handler
Class Method Details
.applicable?(path) ⇒ Boolean
19 20 21 22 23 24 25 |
# File 'lib/archsight/import/handlers/go_grapher.rb', line 19 def self.applicable?(path) File.exist?(File.join(path, "go.work")) || File.exist?(File.join(path, "go.mod")) || Dir.glob(File.join(path, "**/go.mod")).any? rescue Errno::ELOOP, Errno::ENOTDIR false end |
.language_name ⇒ Object
17 |
# File 'lib/archsight/import/handlers/go_grapher.rb', line 17 def self.language_name = "go" |