adminconformance

package
v1.1.18 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package adminconformance provides reusable checks for hosts that mount the workflow-plugin-admin shell and contributed runtime-integrated admin surfaces.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExpectedContribution

type ExpectedContribution struct {
	ID                string `json:"id"`
	Title             string `json:"title,omitempty"`
	Path              string `json:"path,omitempty"`
	RenderMode        string `json:"render_mode,omitempty"`
	RuntimeIntegrated bool
	BackingRoutes     []RouteProbe
}

ExpectedContribution describes an admin surface the host expects the admin registry endpoint to expose.

type Options

type Options struct {
	Handler http.Handler
	BaseURL string
	Client  *http.Client

	ContributionsPath      string
	AuthenticatedHeaders   map[string]string
	UnauthenticatedHeaders map[string]string

	ExpectedContributions []ExpectedContribution
	RouteProbes           []RouteProbe
	UnauthenticatedProbes []RouteProbe
}

Options configures an admin conformance check. Supply either Handler for in-process checks or BaseURL for launched-host checks.

type Result

type Result struct {
	Pass     bool
	Failures []string
}

Result is the aggregate conformance outcome.

func Check

func Check(options Options) Result

Check runs the configured conformance probes.

type RouteProbe

type RouteProbe struct {
	Name           string
	Method         string
	Path           string
	ExpectedStatus int
	RequireBody    bool
	Headers        map[string]string
}

RouteProbe describes one HTTP request/response invariant.

Jump to

Keyboard shortcuts

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