reportconformance

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package reportconformance validates downstream consumer behavior for reporting projections.

Index

Constants

View Source
const (
	BundleSchemaVersion = reportschema.ReportingConsumerConformanceSchemaV1
	ResultSchemaVersion = reportschema.ReportingConsumerConformanceResultV1
	FixtureSetVersion   = "reporting-projection-golden-v1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bundle

type Bundle struct {
	SchemaVersion string           `json:"schema_version"`
	FixtureSet    string           `json:"fixture_set"`
	Consumer      ConsumerIdentity `json:"consumer"`
	PassedAt      string           `json:"passed_at,omitempty"`
	Cases         []CaseResult     `json:"cases"`
}

type CaseResult

type CaseResult struct {
	Name           string         `json:"name"`
	ProjectionID   string         `json:"projection_id"`
	Parsed         bool           `json:"parsed"`
	SemanticChecks SemanticChecks `json:"semantic_checks"`
}

type ConsumerIdentity

type ConsumerIdentity struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

type Error

type Error struct {
	Path    string `json:"path"`
	Kind    string `json:"kind"`
	Message string `json:"message"`
}

type LastPassed

type LastPassed struct {
	Consumer   string `json:"consumer"`
	Version    string `json:"version"`
	FixtureSet string `json:"fixture_set"`
	PassedAt   string `json:"passed_at,omitempty"`
}

type RequiredCase

type RequiredCase struct {
	Name                   string   `json:"name"`
	Description            string   `json:"description"`
	ProjectionID           string   `json:"projection_id"`
	View                   string   `json:"view"`
	MaxSensitivity         string   `json:"max_sensitivity"`
	RequiredSemanticChecks []string `json:"required_semantic_checks"`
}

func RequiredCases

func RequiredCases() []RequiredCase

type Result

type Result struct {
	Kind              string           `json:"kind"`
	SchemaVersion     string           `json:"schema_version"`
	FixtureSet        string           `json:"fixture_set"`
	Consumer          ConsumerIdentity `json:"consumer"`
	Valid             bool             `json:"valid"`
	ParsePassed       bool             `json:"parse_passed"`
	SemanticPassed    bool             `json:"semantic_passed"`
	RequiredCaseCount int              `json:"required_case_count"`
	PassedCaseCount   int              `json:"passed_case_count"`
	ErrorCount        int              `json:"error_count"`
	Errors            []Error          `json:"errors,omitempty"`
	LastPassed        *LastPassed      `json:"last_passed,omitempty"`
	RequiredCases     []RequiredCase   `json:"required_cases,omitempty"`
}

func Validate

func Validate(bundle Bundle) Result

func ValidateJSON

func ValidateJSON(data []byte) (Result, error)

type SemanticChecks

type SemanticChecks struct {
	CanonicalIdentityCorrelated bool `json:"canonical_identity_correlated"`
	RedactedFieldsHandled       bool `json:"redacted_fields_handled,omitempty"`
	MissingFieldsDistinguished  bool `json:"missing_fields_distinguished,omitempty"`
	DowngradeHandled            bool `json:"downgrade_handled,omitempty"`
	NoChangeHandled             bool `json:"no_change_handled,omitempty"`
	FreshnessHandled            bool `json:"freshness_handled,omitempty"`
}

Jump to

Keyboard shortcuts

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