conform

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package conform certifies a Githome instance against the compatibility matrix. It is a black-box client: it speaks only HTTP and reads only the wire shapes, so it certifies any Githome build the same way a real client would see it — whether the instance is a remote origin or an in-process test server. The githome-conform command is a thin CLI over Run; the in-process gate test drives the same Run against a freshly seeded server, so the matrix runs in CI without a live instance or real credentials.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// API is the REST base, e.g. https://git.example.com/api/v3.
	API string
	// GraphQL is the GraphQL endpoint, e.g. https://git.example.com/api/graphql.
	GraphQL string
	// Token authenticates the client; it may be empty for an anonymous run.
	Token string
	// Owner and Repo name the target repository the matrix reads.
	Owner string
	Repo  string
	// HTTP is the client used for every request; Run supplies a default when nil.
	HTTP *http.Client
}

Options points the matrix at one instance and target repository.

type Report

type Report struct {
	// contains filtered or unexported fields
}

Report collects the matrix outcome.

func Run

func Run(opts Options) *Report

Run executes the full conformance matrix against the instance Options names and returns the report. It never returns an error: a transport or shape failure is recorded as a failed row so the report stays the single verdict.

func (*Report) CountFailed

func (r *Report) CountFailed() int

CountFailed returns the number of failed checks.

func (*Report) Failed

func (r *Report) Failed() bool

Failed reports whether any check failed.

func (*Report) Failures

func (r *Report) Failures() []string

Failures returns a one-line "section/check: detail" string for each failed check, so a caller (a test) can name exactly what diverged.

func (*Report) Print

func (r *Report) Print(w io.Writer, target string) error

Print writes the matrix as an aligned table followed by a tally, with target as the report heading.

func (*Report) Total

func (r *Report) Total() int

Total returns the number of checks the matrix ran.

type Status

type Status int

Status is the outcome of one matrix check.

const (
	// Pass means the check ran and the behavior matched.
	Pass Status = iota
	// Fail means the check ran and the behavior did not match.
	Fail
	// Skip means the check did not run.
	Skip
)

func (Status) String

func (s Status) String() string

Jump to

Keyboard shortcuts

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