spec

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package spec embeds the published devbay.yaml JSON Schema and exposes the parts of it the Go validator needs.

The schema file is the single source of truth for anything a third party could reasonably reimplement — the argv[0] allowlist, the interpolation grammar, the credential screen. Reading them from the embedded document rather than restating them in Go keeps the published spec and the shipped validator from drifting apart, which is the whole reason the spec is a standalone artifact.

Index

Constants

This section is empty.

Variables

View Source
var Schema []byte

Functions

This section is empty.

Types

type Rules

type Rules struct {
	Interpolated *regexp.Regexp // R7: the permitted interpolation grammar
	Credential   *regexp.Regexp // R3: known credential prefixes
	Slug         *regexp.Regexp
	Duration     *regexp.Regexp
	Allowlist    map[string]bool // R2: argv[0] values needing no approval
}

Rules are the machine-checkable parts of the schema.

func Load

func Load() (Rules, error)

Load returns the regexes and allowlist extracted from the embedded schema.

Jump to

Keyboard shortcuts

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