Documentation
¶
Index ¶
- type Controller
- func (c *Controller) CleanupBlueprintValidationsHandler(w http.ResponseWriter, r *http.Request)
- func (c *Controller) CreateBlueprintValidationHandler(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetBlueprintValidationHandler(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetCleanupStatusHandler(w http.ResponseWriter, r *http.Request)
- func (c *Controller) StreamEventsHandler(w http.ResponseWriter, r *http.Request)
- type CreateValidationRequestPayload
- type ValidationLoaderConfig
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.