records

package
v3.16.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatJSON

func FormatJSON(results []Result, sum Summary) ([]byte, error)

FormatJSON returns a JSON representation of the discover record results.

func FormatTable

func FormatTable(results []Result, sum Summary) string

FormatTable returns a human-readable table view of discover record results.

func Plan

func Plan(in Input, existingIDs []string) ([]Result, Summary)

Plan computes what Write would produce without touching the filesystem. Useful for --dry-run output. Results are in the same order as in.Groups.

func Write

func Write(in Input, existingIDs []string) ([]Result, Summary, error)

Write generates and saves draft blueprint records to in.ProvenanceDir. Discover is additive — existing records in in.ProvenanceDir are never modified. The provenance directory is created if it does not exist.

Types

type Input

type Input struct {
	Groups        []routes.Group
	StubResults   []stubs.Result              // from Phase 3; matched to groups by method+path
	Boundaries    map[string][]boundaries.Hit // handlerRef → hits; used for summary boundary count
	ProvenanceDir string                      // directory to write records into (e.g. "provenance")
	SpecsDir      string                      // root-relative path to specs (e.g. "specs")
	Author        string                      // author field for generated records; defaults to "linespec-discover"
}

Input holds all data needed to generate draft blueprint records for discovered route groups.

type Result

type Result struct {
	GroupName  string
	RecordID   string
	FilePath   string
	Title      string
	RouteCount int
}

Result is the outcome of generating a single blueprint record for a route group.

type Summary

type Summary struct {
	RouteCount     int
	BoundaryCount  int
	RecordsCreated int
	Unclassified   []string // source files not matched to any route group
}

Summary is the final discover report, aggregated across all phases.

Jump to

Keyboard shortcuts

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