projector

package
v0.51.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2026 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package projector loads AWF sources and projects the fixed generated surface.

Index

Constants

View Source
const InitialProject = `` /* 1099-byte string literal not displayed */

InitialProject is the source created by Init.

View Source
const (
	// SourceFormat is the only source shape accepted by this binary.
	SourceFormat = 1
)

Variables

View Source
var Version = strings.TrimSpace(versionFile)

Version is the release identity embedded in this binary.

Functions

This section is empty.

Types

type Finding

type Finding struct {
	Path    string
	Message string
}

Finding is one reason check considers the projection stale.

func Check

func Check(root string) ([]Finding, error)

Check compares the fixed projection with the filesystem without changing it.

type Output

type Output struct {
	Path  string
	Bytes []byte
	Mode  fs.FileMode
}

Output is one complete generated file.

func Build

func Build(sources SourceTree) []Output

Build returns the complete fixed output set for sources.

type Project

type Project struct {
	Body []byte
}

Project is the opaque project-specific guidance from .awf/project.md.

type RenderResult

type RenderResult struct {
	Changed   []string
	Unmanaged []string
}

RenderResult describes visible render changes and marked files AWF no longer owns.

func Init

func Init(root string) (RenderResult, error)

Init creates the initial project source and renders the fixed output set.

func Render

func Render(root string) (RenderResult, error)

Render validates sources and writes the complete fixed output set. It never deletes files that are no longer outputs.

type SourceTree

type SourceTree struct {
	Project Project
	Topics  []Topic
}

SourceTree is the complete validated source input for one operation.

func Load

func Load(root string) (SourceTree, error)

Load reads and validates the AWF source tree rooted at root.

type Topic

type Topic struct {
	ID         string
	SourcePath string
	Paths      []string
	Body       []byte
}

Topic is one path-routed current-guidance source.

type TopicMatch

type TopicMatch struct {
	ID         string
	SourcePath string
}

TopicMatch identifies one topic selected by Resolve.

func Resolve

func Resolve(root string, values []string) ([]TopicMatch, error)

Resolve returns every topic matching at least one lexical repository-relative path. The target paths do not need to exist.

Jump to

Keyboard shortcuts

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