Help us shape the future of Go! Take the 2026 Go Developer Survey

conformance

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package conformance runs the contract §12 checklist over an index or a manifest held in any OCI content source. hostweave, both guestweave CLIs and weaveoci run the same checks through this package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Child

type Child struct {
	Descriptor  ocispec.Descriptor
	Description spec.Description
	Problems    []spec.Problem
}

Child is the result for one manifest.

type Options

type Options struct {
	// Deep fetches every chunk and state blob and verifies content (rules 15 and 16).
	Deep bool
}

Options select the optional checks.

type Report

type Report struct {
	Root          ocispec.Descriptor
	IndexProblems []spec.Problem
	Children      []Child
}

Report is the result of Check.

func Check

func Check(
	ctx context.Context,
	f content.Fetcher,
	root ocispec.Descriptor,
	o Options,
) (Report, error)

Check validates root, which is either a contract index or a single contract manifest. The returned error reports a failure to read content, not a conformance failure; those are in the report.

func (Report) OK

func (r Report) OK() bool

OK reports whether no problem was found.

func (Report) Problems

func (r Report) Problems() []string

Problems lists every problem as text, index problems first.

Jump to

Keyboard shortcuts

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