Documentation
¶
Overview ¶
Package cargometadata owns Codefly's typed boundary to Cargo's authoritative project graph. Consumers share one command and JSON contract instead of independently parsing Cargo.toml or inventing language metadata.
Index ¶
Constants ¶
This section is empty.
Variables ¶
ErrUnavailable reports that the real Cargo toolchain is absent.
Functions ¶
This section is empty.
Types ¶
type Dependency ¶
type Dependency struct {
Name string `json:"name"`
Source *string `json:"source"`
Req string `json:"req"`
Kind *string `json:"kind"`
Rename *string `json:"rename"`
Path *string `json:"path"`
}
Dependency is a direct Cargo manifest dependency.
type DependencyKind ¶
type DependencyKind struct {
Kind *string `json:"kind"`
}
DependencyKind distinguishes normal, build, and development graph edges.
type Metadata ¶
type Metadata struct {
Packages []Package `json:"packages"`
Resolve *Resolve `json:"resolve"`
WorkspaceMembers []string `json:"workspace_members"`
WorkspaceRoot string `json:"workspace_root"`
}
Metadata is Cargo metadata format-version 1 with the fields shared by project inspection and SBOM graph construction.
type Node ¶
type Node struct {
ID string `json:"id"`
Deps []NodeDependency `json:"deps"`
}
Node is one package in Cargo's resolved dependency graph.
type NodeDependency ¶
type NodeDependency struct {
Pkg string `json:"pkg"`
DepKinds []DependencyKind `json:"dep_kinds"`
}
NodeDependency is one resolved package edge.
type Package ¶
type Package struct {
Name string `json:"name"`
Version string `json:"version"`
ID string `json:"id"`
Source *string `json:"source"`
License *string `json:"license"`
Checksum *string `json:"checksum"`
ManifestPath string `json:"manifest_path"`
Edition string `json:"edition"`
Dependencies []Dependency `json:"dependencies"`
Targets []Target `json:"targets"`
}
Package is one Cargo package declaration.