graph

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cycle

type Cycle struct {
	// Nodes in the cycle
	Nodes []*Node
}

type Edge

type Edge struct {
	From *Node // never nil.
	To   *Node
	// The version of the dependency
	Version string
}

type Graph

type Graph struct {
	Nodes  map[string]*Node // path -> Node
	Edges  []Edge           // Edges
	Cycles []Cycle          // Cycles as they are discovered
}

type ModuleInfo

type ModuleInfo struct {
	Path               string // Module path from go.mod
	RepoPath           string // Repository path (owner/repo) where it was found
	IsFork             bool
	OriginalModulePath string            // Module path from the parent repo's go.mod (if fork)
	Owner              string            // Owner (org or user) where the module definition was found
	OwnerIdx           int               // Index of the owner in the input list (for coloring)
	Deps               map[string]string // path -> version
	Fetched            bool              // Indicates if the go.mod was successfully fetched and parsed
}

ModuleInfo stores details about modules found in the scanned owners (orgs or users).

type Node

type Node struct {
	Path       string
	Module     *ModuleInfo // nil for (ext) dependencies
	PartOfLoop bool
	SetID      int // 0 for first owner/org, 1 for second, etc. - determines the color (with the fork attribute of the module)
}

Jump to

Keyboard shortcuts

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