replacements

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check() error

func Module

func Module(root string) (string, error)

func ModuleRoot

func ModuleRoot() (string, error)

Types

type Config

type Config struct {
	Allow map[string][]string `yaml:"allow"`
}

func LoadConfig

func LoadConfig(root string) (Config, error)

Absent grants nothing: no file, or no key, is an answer, and the answer is no.

func (Config) Allowed

func (c Config) Allowed(path, name string) bool

func (Config) Validate

func (c Config) Validate() error

A typo would otherwise read as a denial: the check names a seam the list looks like it already grants.

type Inspection

type Inspection struct {
	Seams []waffle.Seam
	Paths []string
	Files []string
}

func Inspect

func Inspect(root string, containers []waffle.Container) (Inspection, error)

Takes the containers rather than finding them, because the CLI lets a person name one.

type Report

type Report struct {
	// Once per field, however many tests fill it in.
	Granted  int
	Warnings []string
}

func Verify

func Verify(root string, found Inspection, cfg Config) (Report, error)

The report comes back with the denial too: a warning about the list is worth reading most of all when the list has just refused something.

Jump to

Keyboard shortcuts

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