parser

package
v0.0.0-...-adbc8ac Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactItem

type ArtifactItem struct {
	ID    string            `json:"id"`
	Label string            `json:"label"`
	Kind  string            `json:"kind"`
	Attrs map[string]string `json:"attrs"`
}

type Evidence

type Evidence struct {
	Records      []Record `json:"records"`
	Source       string   `json:"source"`
	NormalizedAt int64    `json:"normalized_at"`
}

Evidence is the top-level output of a parser: Records plus metadata.

type Parser

type Parser interface {
	Parse(r io.Reader) (Evidence, error)
}

Parser is the interface every parser must satisfy

type PrincipalItem

type PrincipalItem struct {
	ID    string            `json:"id"`
	Label string            `json:"label"`
	Kind  string            `json:"kind"`
	Attrs map[string]string `json:"attrs"`
}

type Record

type Record struct {
	Step         StepItem       `json:"step"`
	Principal    PrincipalItem  `json:"principal"`
	ArtifactsIn  []ArtifactItem `json:"artifacts_in"`
	ArtifactsOut []ArtifactItem `json:"artifacts_out"`
	Resources    []ResourceItem `json:"resources"`
}

Record holds one unit of parsed provenance

type ResourceItem

type ResourceItem struct {
	ID    string            `json:"id"`
	Label string            `json:"label"`
	Kind  string            `json:"kind"`
	Attrs map[string]string `json:"attrs"`
}

type StepItem

type StepItem struct {
	ID    string            `json:"id"`
	Label string            `json:"label"`
	Kind  string            `json:"kind"`
	Attrs map[string]string `json:"attrs"`
}

Directories

Path Synopsis
Package buildinfo implements the BuildinfoParser for AStRA.
Package buildinfo implements the BuildinfoParser for AStRA.
Package git implements the GitParser for AStRA.
Package git implements the GitParser for AStRA.

Jump to

Keyboard shortcuts

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