auditschema

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package auditschema publishes the versioned JSON Schema contracts for the gowdk audit report (`gowdk audit --json`) and the security manifest (gowdk-security.json). The schema files are embedded so the CLI can print them (`gowdk audit --schema`) and tests can assert the emitted JSON stays compatible with the published contract.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuditReportSchema

func AuditReportSchema() []byte

AuditReportSchema returns the embedded audit report JSON Schema.

func DescribedKeys

func DescribedKeys(name Name, path ...string) (map[string]bool, error)

DescribedKeys returns the property names declared under the given path of the named schema. An empty path targets the schema root; a non-empty path walks nested objects (for example "$defs", "finding"). Compatibility tests use it to assert every key the CLI emits is part of the published contract, so a new struct field cannot silently drift away from the schema.

func Names

func Names() []string

Names lists the published schema selectors in stable order.

func Schema

func Schema(name Name) ([]byte, error)

Schema returns the embedded JSON Schema bytes for the named contract.

func SecurityManifestSchema

func SecurityManifestSchema() []byte

SecurityManifestSchema returns the embedded security manifest JSON Schema.

Types

type Name

type Name string

Name identifies one published schema.

const (
	// AuditReport is the schema for `gowdk audit --json`.
	AuditReport Name = "report"
	// SecurityManifest is the schema for gowdk-security.json.
	SecurityManifest Name = "security"
)

Jump to

Keyboard shortcuts

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