Documentation
¶
Index ¶
- Constants
- func SupportedVersions() []string
- type Digest
- type ExampleInfo
- type FileLock
- type Lock
- type LockSource
- type Set
- func (s *Set) Case(relative string) ([]byte, error)
- func (s *Set) EvaluationManifest() ([]byte, error)
- func (s *Set) EvaluationManifestSchema() ([]byte, error)
- func (s *Set) EvaluationPack(relative string) ([]byte, error)
- func (s *Set) Example(name string) ([]byte, ExampleInfo, error)
- func (s *Set) Examples() ([]ExampleInfo, error)
- func (s *Set) File(relative string) (FileLock, bool)
- func (s *Set) HasEvaluationCorpus() bool
- func (s *Set) Lock() Lock
- func (s *Set) Manifest() ([]byte, error)
- func (s *Set) ManifestSchema() ([]byte, error)
- func (s *Set) Read(relative string) ([]byte, error)
- func (s *Set) Schema() ([]byte, error)
- type UnknownExampleError
- type UnsupportedVersionError
Constants ¶
const ( DraftVersion = "0.1.0-draft" EvaluatorDraftVersion = "0.2.0-draft" )
DraftVersion is the specification version every surface selects when a caller names none. EvaluatorDraftVersion is the newer bundled draft, whose Core adds the evaluator conformance class (§3.4) and publishes the evaluation corpus (§3.4.1); bundling it changes no default. It is also the exact version the claim in CONFORMANCE.md is made against and the only version this runtime's evaluator admits (§11), and a claim is not inherited by any other version, so bundling a third version would claim nothing by itself either.
Variables ¶
This section is empty.
Functions ¶
func SupportedVersions ¶
func SupportedVersions() []string
Types ¶
type ExampleInfo ¶ added in v0.1.0
ExampleInfo describes one bundled valid example: its stable name (the case file stem), the one-line focus from the manifest, and the specification section it exercises. It is metadata only; Example returns the bytes.
type Lock ¶
type Lock struct {
FormatVersion int `json:"formatVersion"`
SpecVersion string `json:"specVersion"`
Source LockSource `json:"source"`
BundleDigest Digest `json:"bundleDigest"`
Files []FileLock `json:"files"`
}
type LockSource ¶
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
func (*Set) EvaluationManifest ¶ added in v0.4.0
EvaluationManifest returns the bundled evaluation-corpus manifest bytes.
func (*Set) EvaluationManifestSchema ¶ added in v0.4.0
EvaluationManifestSchema returns the schema the evaluation-corpus manifest is carried by.
func (*Set) EvaluationPack ¶ added in v0.4.0
EvaluationPack returns one evaluation-corpus pack fixture by its manifest path, which is always a single file directly under packs/. Anything else is refused before a path is built, so a manifest cannot reach an artifact outside the corpus even though every read is also checked against the lock.
func (*Set) Example ¶ added in v0.1.0
func (s *Set) Example(name string) ([]byte, ExampleInfo, error)
Example returns one bundled valid example's document bytes and metadata by name. The name is resolved against the enumerated examples, never used to build a path from caller input, so it cannot escape the embedded valid-case set; an unknown name yields *UnknownExampleError.
func (*Set) Examples ¶ added in v0.1.0
func (s *Set) Examples() ([]ExampleInfo, error)
Examples enumerates the bundled valid conformance cases as examples, sorted by name. These are the digest-locked fixtures the set already embeds, offered read-only; they are version-pinned corpus fixtures, not authored templates.
func (*Set) HasEvaluationCorpus ¶ added in v0.4.0
HasEvaluationCorpus reports whether this set bundles the evaluation corpus of JPS §3.4.1. A specification version whose Core defines no evaluator class publishes none.
func (*Set) ManifestSchema ¶
type UnknownExampleError ¶ added in v0.1.0
type UnknownExampleError struct {
Name string
}
UnknownExampleError reports a request for an example name that is not one of the bundled valid examples.
func (*UnknownExampleError) Error ¶ added in v0.1.0
func (e *UnknownExampleError) Error() string
type UnsupportedVersionError ¶
type UnsupportedVersionError struct {
Version string
}
func (*UnsupportedVersionError) Error ¶
func (e *UnsupportedVersionError) Error() string