moduleapi

package
v0.29.3 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	SuppliedFiles map[string]bool
	DirToFiles    map[string][]string
	// FilesByExtension groups supplied files by their extension (e.g. ".go").
	// Providers fetch the extensions they declare, so this shared contract never
	// enumerates specific languages.
	FilesByExtension map[string][]string
}

Context contains precomputed project data shared across language providers.

type Graph

type Graph interface {
	Vertex(hash string) (string, error)
	AddEdge(sourceHash, targetHash string, options ...func(*graphlib.EdgeProperties)) error
}

Graph is the minimal graph contract language resolvers need during finalization.

type MaturityLevel

type MaturityLevel int

MaturityLevel describes how complete a language's analysis support is.

const (
	MaturityUntested MaturityLevel = iota
	MaturityBasicTests
	MaturityActivelyTested
	MaturityStable
)

func MaturityLevels

func MaturityLevels() []MaturityLevel

MaturityLevels returns the ordered set of known maturity levels.

func (MaturityLevel) DisplayName

func (level MaturityLevel) DisplayName() string

func (MaturityLevel) MachineName added in v0.28.0

func (level MaturityLevel) MachineName() string

MachineName returns a stable, machine-readable slug for the maturity level, suitable for JSON output and programmatic consumers. Unlike DisplayName it is lowercase and underscore-separated, and unlike the underlying iota value it is stable across reordering of the enum.

func (MaturityLevel) Symbol

func (level MaturityLevel) Symbol() string

type Provider added in v0.27.0

type Provider interface {
	Name() string
	Extensions() []string
	Maturity() MaturityLevel
	NewResolver(ctx *Context, contentReader vcs.ContentReader) Resolver
	IsTestFile(filePath string, contentReader vcs.ContentReader) bool
}

Provider describes pluggable language support.

type Resolver

type Resolver interface {
	ResolveProjectImports(absPath, filePath, ext string) ([]string, error)
	FinalizeGraph(graph Graph) error
}

Resolver resolves project imports for one language and can finalize graph-wide state.

Jump to

Keyboard shortcuts

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