Help us shape the future of Go! Take the 2026 Go Developer Survey

writ

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: Apache-2.0, Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package writ is the facade over the writ policy language frontend: parse, check, and lower to the IL in one call. The language packages beneath it (parser, compile, il, eval) are server-free by design — they are destined for extraction into a standalone module shared with the writ server (SPEC §12.11).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(src string) (*il.Policy, []diag.Diagnostic)

Load parses and compiles policy source. The policy is non-nil iff no error-severity diagnostics were produced; warnings ride along either way and never block.

Types

This section is empty.

Directories

Path Synopsis
Package ast is the parsed form of a writ policy file, a direct port of the retired Rust spike's ast.rs (the porting reference named by SPEC §12.11).
Package ast is the parsed form of a writ policy file, a direct port of the retired Rust spike's ast.rs (the porting reference named by SPEC §12.11).
Package compile checks a parsed writ file for well-formedness and lowers it to the IL.
Package compile checks a parsed writ file for well-formedness and lowers it to the IL.
Package diag holds source positions and diagnostics for the writ policy language.
Package diag holds source positions and diagnostics for the writ policy language.
Package eval is SPEC §8 as a pure function: order-independent evaluation of a compiled policy against one (user, host, account) request.
Package eval is SPEC §8 as a pure function: order-independent evaluation of a compiled policy against one (user, host, account) request.
Package il is writ's intermediate language: the compiled rule format per SPEC §10–11.
Package il is writ's intermediate language: the compiled rule format per SPEC §10–11.
Package parser turns writ policy source into the AST.
Package parser turns writ policy source into the AST.

Jump to

Keyboard shortcuts

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