validationv1

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: Apache-2.0 Imports: 23 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

Controller handles validation-related HTTP requests including streaming validation events over Server-Sent Events (SSE).

func NewController

func NewController(
	validationRetentionPeriod time.Duration,
	deps *typesv1.Dependencies,
) *Controller

NewController creates a new validation Controller instance with the provided dependencies.

func (*Controller) CleanupBlueprintValidationsHandler

func (c *Controller) CleanupBlueprintValidationsHandler(
	w http.ResponseWriter,
	r *http.Request,
)

CleanupBlueprintValidationsHandler is the handler for the POST /validations/cleanup endpoint that cleans up blueprint validations that are older than the configured retention period.

func (*Controller) CreateBlueprintValidationHandler

func (c *Controller) CreateBlueprintValidationHandler(
	w http.ResponseWriter,
	r *http.Request,
)

CreateBlueprintValidationHandler is the handler for the POST /validation endpoint that creates a new validation for a blueprint.

func (*Controller) GetBlueprintValidationHandler

func (c *Controller) GetBlueprintValidationHandler(
	w http.ResponseWriter,
	r *http.Request,
)

GetBlueprintValidationHandler is the handler for the GET /validation/{id} endpoint that retrieves metadata and status of a blueprint validation.

func (*Controller) GetCleanupStatusHandler added in v0.3.0

func (c *Controller) GetCleanupStatusHandler(
	w http.ResponseWriter,
	r *http.Request,
)

GetCleanupStatusHandler is the handler for the GET /validations/cleanup/{id} endpoint that retrieves the status of a cleanup operation.

func (*Controller) StreamEventsHandler

func (c *Controller) StreamEventsHandler(w http.ResponseWriter, r *http.Request)

StreamEventsHandler is the handler for the GET /validation/{id}/stream endpoint that streams validation events to the client using Server-Sent Events (SSE).

type CreateValidationRequestPayload

type CreateValidationRequestPayload struct {
	resolve.BlueprintDocumentInfo
	// Config values for the validation process
	// that will be used in plugins and passed into the blueprint.
	Config *types.BlueprintOperationConfig `json:"config"`
	// LoaderConfig allows opt-in overrides to the validation loader's
	// default behaviour. When omitted, today's defaults apply
	// (transformSpec=false, validateAfterTransform=false).
	LoaderConfig *ValidationLoaderConfig `json:"loaderConfig,omitempty"`
}

CreateValidationRequestPayload represents the payload for creating a new blueprint validation.

type ValidationLoaderConfig added in v0.7.0

type ValidationLoaderConfig struct {
	// TransformSpec enables transformer plugins during validation.
	// Requires transformer plugins that handle the validation context.
	TransformSpec *bool `json:"transformSpec,omitempty"`
	// ValidateAfterTransform enables resource validation against the
	// transformed blueprint shape. Has no effect unless TransformSpec is
	// also true.
	ValidateAfterTransform *bool `json:"validateAfterTransform,omitempty"`
}

ValidationLoaderConfig carries opt-in flags that override the shared validation loader's defaults for a single request.

Jump to

Keyboard shortcuts

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