perkv1

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package perkv1 embeds the canonical machine-readable perk/v1 contract: the JSON Schema document and the fixture frames plus their manifest, all under protocol/perk-v1. It is the single compiled-in source for tooling such as the plugin conformance runner, so the contract is never copied into a binary or another directory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fixture

func Fixture(name string) ([]byte, error)

Fixture returns one canonical fixture frame by file name — the manifest entry's "file" value. The frame is a complete wire frame (newline-terminated JSON).

func FixtureNames

func FixtureNames() ([]string, error)

FixtureNames lists every fixture file embedded in this package, in sorted order. Tests use it to prove the fixture directory and the manifest never drift apart.

func Manifest

func Manifest() ([]byte, error)

Manifest returns the fixture manifest (fixtures/manifest.json): the description of every canonical frame, its file name, validity, schema $ref, and the expected method, error code, kind, and rejection where applicable.

func Schema

func Schema() []byte

Schema returns the canonical perk/v1 JSON Schema document.

Types

type Source

type Source struct{}

Source is the canonical protocol-asset provider for the conformance engine. It implements the engine's source contract with the embedded assets.

func (Source) Fixture

func (Source) Fixture(name string) ([]byte, error)

Fixture returns one embedded fixture frame by file name.

func (Source) FixtureNames

func (Source) FixtureNames() ([]string, error)

FixtureNames returns every embedded fixture file name in sorted order — the contract digest's fixture enumeration.

func (Source) Manifest

func (Source) Manifest() ([]byte, error)

Manifest returns the embedded fixture manifest.

func (Source) Schema

func (Source) Schema() []byte

Schema returns the embedded JSON Schema document.

Jump to

Keyboard shortcuts

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