reportconformance

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 6 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 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