resourceconformance

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package resourceconformance is verification-only data and finite oracles. It is internal to the SDK repository, is not registered by a product, and has no SDK transport dependency. Its types describe this corpus, not future APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckChanges

func CheckChanges(s Scenario, got []Change) error

CheckChanges preserves finite delivery order without interpreting revisions. The deliberate event:z9 -> event:a1 transition forbids lexical recency tests.

func CheckPages

func CheckPages(s Scenario, got []Page) error

CheckPages checks native source-page traversal, not final query pagination.

func SameAddress

func SameAddress(a, b Record) bool

SameAddress is only a test oracle, not a canonical encoder or host identity implementation. Access routes, bodies, incarnation and revisions are excluded.

Types

type Change

type Change struct {
	Record   string
	Revision string
	Body     json.RawMessage
}

Change is one ordered native update; Revision remains opaque, not sortable.

type Corpus

type Corpus struct {
	Records       []Record
	Scenarios     []Scenario
	IdentityCases []IdentityCase
	Links         []Link
}

Corpus owns finite fixture expectations, not product registrations or wire types. Callers may mutate a corpus; each NativeCorpus call returns independent storage.

func NativeCorpus

func NativeCorpus() Corpus

NativeCorpus returns fresh, deterministic, credential-free data on each call. IDs and cursors deliberately contain delimiter, slash, percent and Unicode characters. Native numeric JSON remains unparsed; no float64 conversion.

func (c Corpus) CheckLinks(bodies map[string]json.RawMessage) error

CheckLinks resolves only the six hand-authored native hypervisor edges. It is not a graph engine or proposed relationship DTO. Bodies can come from a real transport; identical node-local numeric IDs on another node never resolve.

func (Corpus) CheckSnapshot

func (c Corpus) CheckSnapshot(s Scenario, got []Observation, coverage Coverage, freshness string) error

CheckSnapshot compares a finite scenario, not query-language semantics. A consumer supplies observations and its declared guarantees independently.

func (Corpus) Record

func (c Corpus) Record(name string) Record

Record returns the named fixture, sharing its scope and body; unknown names panic.

func (Corpus) Validate

func (c Corpus) Validate() error

Validate prevents malformed corpus edits from turning a finite oracle into a self-fulfilling expectation. Identity/link expectations remain hand-authored.

type Coverage

type Coverage struct {
	Enumeration string
	Consistency string
	Limitations []string
}

Coverage records native enumeration and consistency claims without upgrading them.

type IdentityCase

type IdentityCase struct {
	Name        string
	Left, Right string
	Equal       bool
}

IdentityCase supplies independent expected equality for two named records.

type Link struct {
	From, Relation, To string
}

Link names a native relation whose endpoints must remain in the same node scope.

type Observation

type Observation struct {
	Record Record
	Body   json.RawMessage
}

Observation pairs a native identity with the body actually seen by a consumer.

type Page

type Page struct {
	Cursor  string
	Next    string
	Records []string // finite oracle names, never wire identity
}

Page names finite corpus members in native cursor order; empty Next ends traversal.

type Record

type Record struct {
	Name        string
	Provider    string
	Authority   string
	Type        string
	Scope       map[string]string
	ID          string // canonical decimal text for native numeric IDs
	Incarnation string // absent means unknown, never a synthesized UID
	Revision    string // opaque; never sorted
	Body        json.RawMessage
}

Record preserves one native object's exact identity, tokens, and JSON body. Scope and Body remain caller-owned mutable containers.

type Scenario

type Scenario struct {
	Name       string
	Profile    string
	Type       string
	Selection  map[string][]string // explicit finite selected native scope values
	Schema     json.RawMessage     // nil means not provided
	Pages      []Page
	Coverage   Coverage
	Freshness  string
	Updates    []Change
	Operations map[string]string // finite fixture expectations, not SDK capabilities
}

Scenario binds selected native scopes to finite pages and declared guarantees. A nil Schema means the source did not provide one.

Jump to

Keyboard shortcuts

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