preflight_kit_api

package module
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2025 License: MIT Imports: 14 Imported by: 7

README

PreflightKit Go API

This module exposes Go types that you will find helpful when implementing an PreflightKit extension.

The types are generated automatically from the PreflightKit OpenAPI specification.

Installation

Add the following to your go.mod file:

go get github.com/steadybit/preflight-kit/go/preflight_kit_api

Usage

import (
	"github.com/steadybit/preflight-kit/go/preflight_kit_api"
)

preflightList := preflight_kit_api.PreflightList{
    Preflights: []preflight_kit_api.DescribingEndpointReference{
        {
            "GET",
            "/preflights/check-experiment-start",
        },
    },
}

Documentation

Overview

Package preflight_kit_api provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

Types

type AbstractExperimentExecutionStepAO

type AbstractExperimentExecutionStepAO struct {
	// CustomLabel Custom label assigned during experiment design to express the intention of this step
	CustomLabel *string `json:"customLabel,omitempty"`

	// Ended Timestamp when this experiment step ended
	Ended *time.Time `json:"ended,omitempty"`

	// Id Unique identifier of this step execution
	Id *openapi_types.UUID `json:"id,omitempty"`

	// IgnoreFailure Whether the experiment should fail/error immediately in case this step fails/errors.
	IgnoreFailure *bool `json:"ignoreFailure,omitempty"`

	// Parameters Step-specific parameters of the experiment step configuration
	Parameters *map[string]interface{} `json:"parameters,omitempty"`

	// PredecessorId Unique identifier of the step execution that precedes this step, null if it is the first step of a lane
	PredecessorId *openapi_types.UUID `json:"predecessorId,omitempty"`

	// Reason Reason in case this experiment step execution failed or errored
	Reason *string `json:"reason,omitempty"`

	// Started Timestamp when this experiment step was started
	Started *time.Time `json:"started,omitempty"`

	// State Current state of this step in the experiment (e.g. RUNNING, FAILED, ERRORED, COMPLETED)
	State *string `json:"state,omitempty"`

	// StepType Type of this step execution (e.g. ACTION, WAIT)
	StepType string `json:"stepType"`
	// contains filtered or unexported fields
}

AbstractExperimentExecutionStepAO A step that is executed as part of an experiment.

func (AbstractExperimentExecutionStepAO) AsExperimentExecutionStepActionAO

func (t AbstractExperimentExecutionStepAO) AsExperimentExecutionStepActionAO() (ExperimentExecutionStepActionAO, error)

AsExperimentExecutionStepActionAO returns the union data inside the AbstractExperimentExecutionStepAO as a ExperimentExecutionStepActionAO

func (AbstractExperimentExecutionStepAO) AsExperimentExecutionStepWaitAO

func (t AbstractExperimentExecutionStepAO) AsExperimentExecutionStepWaitAO() (ExperimentExecutionStepWaitAO, error)

AsExperimentExecutionStepWaitAO returns the union data inside the AbstractExperimentExecutionStepAO as a ExperimentExecutionStepWaitAO

func (AbstractExperimentExecutionStepAO) Discriminator

func (t AbstractExperimentExecutionStepAO) Discriminator() (string, error)

func (*AbstractExperimentExecutionStepAO) FromExperimentExecutionStepActionAO

func (t *AbstractExperimentExecutionStepAO) FromExperimentExecutionStepActionAO(v ExperimentExecutionStepActionAO) error

FromExperimentExecutionStepActionAO overwrites any union data inside the AbstractExperimentExecutionStepAO as the provided ExperimentExecutionStepActionAO

func (*AbstractExperimentExecutionStepAO) FromExperimentExecutionStepWaitAO

func (t *AbstractExperimentExecutionStepAO) FromExperimentExecutionStepWaitAO(v ExperimentExecutionStepWaitAO) error

FromExperimentExecutionStepWaitAO overwrites any union data inside the AbstractExperimentExecutionStepAO as the provided ExperimentExecutionStepWaitAO

func (AbstractExperimentExecutionStepAO) MarshalJSON

func (t AbstractExperimentExecutionStepAO) MarshalJSON() ([]byte, error)

func (*AbstractExperimentExecutionStepAO) MergeExperimentExecutionStepActionAO

func (t *AbstractExperimentExecutionStepAO) MergeExperimentExecutionStepActionAO(v ExperimentExecutionStepActionAO) error

MergeExperimentExecutionStepActionAO performs a merge with any union data inside the AbstractExperimentExecutionStepAO, using the provided ExperimentExecutionStepActionAO

func (*AbstractExperimentExecutionStepAO) MergeExperimentExecutionStepWaitAO

func (t *AbstractExperimentExecutionStepAO) MergeExperimentExecutionStepWaitAO(v ExperimentExecutionStepWaitAO) error

MergeExperimentExecutionStepWaitAO performs a merge with any union data inside the AbstractExperimentExecutionStepAO, using the provided ExperimentExecutionStepWaitAO

func (*AbstractExperimentExecutionStepAO) UnmarshalJSON

func (t *AbstractExperimentExecutionStepAO) UnmarshalJSON(b []byte) error

func (AbstractExperimentExecutionStepAO) ValueByDiscriminator

func (t AbstractExperimentExecutionStepAO) ValueByDiscriminator() (interface{}, error)

type AttributeAO

type AttributeAO struct {
	// Key The key of the attribute, may be associated multiple times to the same target
	Key string `json:"key"`

	// Value The value of the attribute
	Value string `json:"value"`
}

AttributeAO An attributes (key-value-pair) that is associated to a target

type BlastRadiusAO

type BlastRadiusAO struct {
	// Maximum In case a fixed number of as subset of specified targets should be effected
	Maximum *int32 `json:"maximum,omitempty"`

	// Percentage In case a percentage subset of the specified targets should be effected
	Percentage *int32 `json:"percentage,omitempty"`

	// Predicate Query defining the overall superset of targets being effected
	Predicate *TargetPredicate `json:"predicate,omitempty"`

	// TargetType Target type that is effected by that action
	TargetType *string `json:"targetType,omitempty"`
}

BlastRadiusAO Blast radius that is applied to define the set of targets as well as an optional random subset

type CancelPreflightRequestBody

type CancelPreflightRequestBody struct {
	PreflightActionExecutionId uuid.UUID `json:"preflightActionExecutionId"`

	// State Any kind of action specific state that will be passed to the next endpoints.
	State PreflightState `json:"state"`
}

CancelPreflightRequestBody defines model for CancelPreflightRequestBody.

type CancelPreflightResponse

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

CancelPreflightResponse defines model for CancelPreflightResponse.

func (CancelPreflightResponse) AsCancelResult

func (t CancelPreflightResponse) AsCancelResult() (CancelResult, error)

AsCancelResult returns the union data inside the CancelPreflightResponse as a CancelResult

func (CancelPreflightResponse) AsPreflightKitError

func (t CancelPreflightResponse) AsPreflightKitError() (PreflightKitError, error)

AsPreflightKitError returns the union data inside the CancelPreflightResponse as a PreflightKitError

func (*CancelPreflightResponse) FromCancelResult

func (t *CancelPreflightResponse) FromCancelResult(v CancelResult) error

FromCancelResult overwrites any union data inside the CancelPreflightResponse as the provided CancelResult

func (*CancelPreflightResponse) FromPreflightKitError

func (t *CancelPreflightResponse) FromPreflightKitError(v PreflightKitError) error

FromPreflightKitError overwrites any union data inside the CancelPreflightResponse as the provided PreflightKitError

func (CancelPreflightResponse) MarshalJSON

func (t CancelPreflightResponse) MarshalJSON() ([]byte, error)

func (*CancelPreflightResponse) MergeCancelResult

func (t *CancelPreflightResponse) MergeCancelResult(v CancelResult) error

MergeCancelResult performs a merge with any union data inside the CancelPreflightResponse, using the provided CancelResult

func (*CancelPreflightResponse) MergePreflightKitError

func (t *CancelPreflightResponse) MergePreflightKitError(v PreflightKitError) error

MergePreflightKitError performs a merge with any union data inside the CancelPreflightResponse, using the provided PreflightKitError

func (*CancelPreflightResponse) UnmarshalJSON

func (t *CancelPreflightResponse) UnmarshalJSON(b []byte) error

type CancelResult

type CancelResult struct {
	// Error An enhanced version of RFC 7807 Problem Details for HTTP APIs compliant response body for error scenarios
	Error *PreflightKitError `json:"error,omitempty"`

	// Modifications A list of execution modifications (e.g. property updates) Any of
	//   - `preflight_kit_api.ExecutionModificationSetPropertyValue`
	//   - `preflight_kit_api.ExecutionModificationAddValueToListProperty`
	Modifications *ExecutionModifications `json:"modifications,omitempty"`

	// Summary A short summary that will be displayed in the experiment execution details.
	Summary *Summary `json:"summary,omitempty"`
}

CancelResult defines model for CancelResult.

type DescribePreflightResponse

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

DescribePreflightResponse defines model for DescribePreflightResponse.

func (DescribePreflightResponse) AsPreflightDescription

func (t DescribePreflightResponse) AsPreflightDescription() (PreflightDescription, error)

AsPreflightDescription returns the union data inside the DescribePreflightResponse as a PreflightDescription

func (DescribePreflightResponse) AsPreflightKitError

func (t DescribePreflightResponse) AsPreflightKitError() (PreflightKitError, error)

AsPreflightKitError returns the union data inside the DescribePreflightResponse as a PreflightKitError

func (*DescribePreflightResponse) FromPreflightDescription

func (t *DescribePreflightResponse) FromPreflightDescription(v PreflightDescription) error

FromPreflightDescription overwrites any union data inside the DescribePreflightResponse as the provided PreflightDescription

func (*DescribePreflightResponse) FromPreflightKitError

func (t *DescribePreflightResponse) FromPreflightKitError(v PreflightKitError) error

FromPreflightKitError overwrites any union data inside the DescribePreflightResponse as the provided PreflightKitError

func (DescribePreflightResponse) MarshalJSON

func (t DescribePreflightResponse) MarshalJSON() ([]byte, error)

func (*DescribePreflightResponse) MergePreflightDescription

func (t *DescribePreflightResponse) MergePreflightDescription(v PreflightDescription) error

MergePreflightDescription performs a merge with any union data inside the DescribePreflightResponse, using the provided PreflightDescription

func (*DescribePreflightResponse) MergePreflightKitError

func (t *DescribePreflightResponse) MergePreflightKitError(v PreflightKitError) error

MergePreflightKitError performs a merge with any union data inside the DescribePreflightResponse, using the provided PreflightKitError

func (*DescribePreflightResponse) UnmarshalJSON

func (t *DescribePreflightResponse) UnmarshalJSON(b []byte) error

type DescribingEndpointReference

type DescribingEndpointReference struct {
	Method ReadHttpMethod `json:"method"`

	// Path Absolute path of the HTTP endpoint.
	Path string `json:"path"`
}

DescribingEndpointReference HTTP endpoint which the Steadybit platform/agent could communicate with.

type ExecutionModification added in v1.4.0

type ExecutionModification interface{}

type ExecutionModificationAddValueToListProperty added in v1.4.0

type ExecutionModificationAddValueToListProperty struct {
	// PropertyKey The key of the property.
	PropertyKey string `json:"propertyKey"`

	// Type The type of the modification. Needs to be set to `preflight_kit_api.AddValueToListProperty`.
	Type ExecutionModificationAddValueToListPropertyType `json:"type"`

	// Value The value to add.
	Value interface{} `json:"value"`
}

ExecutionModificationAddValueToListProperty Adds a value to a list property within the experiment execution's properties.

type ExecutionModificationAddValueToListPropertyType added in v1.4.0

type ExecutionModificationAddValueToListPropertyType string

ExecutionModificationAddValueToListPropertyType The type of the modification. Needs to be set to `preflight_kit_api.AddValueToListProperty`.

const (
	AddValueToListProperty ExecutionModificationAddValueToListPropertyType = "add_value_to_list_property"
)

Defines values for ExecutionModificationAddValueToListPropertyType.

type ExecutionModificationSetPropertyValue added in v1.4.0

type ExecutionModificationSetPropertyValue struct {
	// PropertyKey The key of the property.
	PropertyKey string `json:"propertyKey"`

	// Type The type of the modification. Needs to be set to `preflight_kit_api.SetPropertyValue`.
	Type ExecutionModificationSetPropertyValueType `json:"type"`

	// Value The value to set.
	Value interface{} `json:"value"`
}

ExecutionModificationSetPropertyValue Set the value of a property within the experiment execution's properties.

type ExecutionModificationSetPropertyValueType added in v1.4.0

type ExecutionModificationSetPropertyValueType string

ExecutionModificationSetPropertyValueType The type of the modification. Needs to be set to `preflight_kit_api.SetPropertyValue`.

const (
	SetPropertyValue ExecutionModificationSetPropertyValueType = "set_property_value"
)

Defines values for ExecutionModificationSetPropertyValueType.

type ExecutionModifications added in v1.4.0

type ExecutionModifications = []ExecutionModification

ExecutionModifications A list of execution modifications (e.g. property updates) Any of

  • `preflight_kit_api.ExecutionModificationSetPropertyValue`
  • `preflight_kit_api.ExecutionModificationAddValueToListProperty`

type ExperimentExecutionAO

type ExperimentExecutionAO struct {
	// CanceledBy The user that connected the hub
	CanceledBy *UserSummaryAO `json:"canceledBy,omitempty"`

	// Created Timestamp when the experiment was created
	Created *time.Time `json:"created,omitempty"`

	// CreatedBy The user that connected the hub
	CreatedBy *UserSummaryAO `json:"createdBy,omitempty"`

	// CreatedVia The creation trigger that caused this experiment execution to be started
	CreatedVia *ExperimentExecutionAOCreatedVia `json:"createdVia,omitempty"`

	// Ended Timestamp when the experiment ended
	Ended *time.Time `json:"ended,omitempty"`

	// ExperimentVersion Experiment design version which can be used to identify changes between experiment runs
	ExperimentVersion *int32 `json:"experimentVersion,omitempty"`

	// Hypothesis The hypothesis that is validated by the experiment
	Hypothesis *string `json:"hypothesis,omitempty"`

	// Id Unique experiment execution id that identifies this specific experiment execution
	Id *int32 `json:"id,omitempty"`

	// Key Unique experiment key that identifies the experiment. Combination of `team key` and increasing number
	Key *string `json:"key,omitempty"`

	// Name Name of the experiment to easily identify the experiment
	Name *string `json:"name,omitempty"`

	// Properties The properties of the experiment execution
	Properties *map[string]interface{} `json:"properties,omitempty"`

	// PropertiesVersion Version of the properties for optimistic locking (optional in the Update-API)
	PropertiesVersion *int32 `json:"propertiesVersion,omitempty"`

	// Reason Reason in case the experiment execution failed or errored
	Reason *string `json:"reason,omitempty"`

	// Requested Timestamp when the experiment was requested
	Requested *time.Time `json:"requested,omitempty"`

	// Started Timestamp when the experiment was started
	Started *time.Time `json:"started,omitempty"`

	// State Current state of the experiment (e.g. CREATED, RUNNING, FAILED, ERRORED, COMPLETED)
	State *string `json:"state,omitempty"`

	// Steps The steps that are executed in parallel or sequence in the experiment.
	Steps *[]AbstractExperimentExecutionStepAO `json:"steps,omitempty"`

	// Variables Variables and their origins that have been used for this execution
	Variables *map[string]ExperimentExecutionVariableAO `json:"variables,omitempty"`
}

ExperimentExecutionAO A single experiment execution that was triggered from a single experiment.

type ExperimentExecutionAOCreatedVia

type ExperimentExecutionAOCreatedVia string

ExperimentExecutionAOCreatedVia The creation trigger that caused this experiment execution to be started

const (
	ExperimentExecutionAOCreatedViaAPI      ExperimentExecutionAOCreatedVia = "API"
	ExperimentExecutionAOCreatedViaCLI      ExperimentExecutionAOCreatedVia = "CLI"
	ExperimentExecutionAOCreatedViaSCHEDULE ExperimentExecutionAOCreatedVia = "SCHEDULE"
	ExperimentExecutionAOCreatedViaUI       ExperimentExecutionAOCreatedVia = "UI"
)

Defines values for ExperimentExecutionAOCreatedVia.

type ExperimentExecutionStepActionAO

type ExperimentExecutionStepActionAO struct {
	// ActionId Unique identifier of the action that is executed in this step
	ActionId *string `json:"actionId,omitempty"`

	// ActionKind Kind of the action (e.g. attack, check, loadtest)
	ActionKind *ExperimentExecutionStepActionAOActionKind `json:"actionKind,omitempty"`

	// CustomLabel Custom label assigned during experiment design to express the intention of this step
	CustomLabel *string `json:"customLabel,omitempty"`

	// Ended Timestamp when this experiment step ended
	Ended *time.Time `json:"ended,omitempty"`

	// Id Unique identifier of this step execution
	Id *openapi_types.UUID `json:"id,omitempty"`

	// IgnoreFailure Whether the experiment should fail/error immediately in case this step fails/errors.
	IgnoreFailure *bool `json:"ignoreFailure,omitempty"`

	// Parameters Step-specific parameters of the experiment step configuration
	Parameters *map[string]interface{} `json:"parameters,omitempty"`

	// PredecessorId Unique identifier of the step execution that precedes this step, null if it is the first step of a lane
	PredecessorId *openapi_types.UUID `json:"predecessorId,omitempty"`

	// Radius Blast radius that is applied to define the set of targets as well as an optional random subset
	Radius *BlastRadiusAO `json:"radius,omitempty"`

	// Reason Reason in case this experiment step execution failed or errored
	Reason *string `json:"reason,omitempty"`

	// Started Timestamp when this experiment step was started
	Started *time.Time `json:"started,omitempty"`

	// State Current state of this step in the experiment (e.g. RUNNING, FAILED, ERRORED, COMPLETED)
	State *string `json:"state,omitempty"`

	// StepType Type of this step execution (e.g. ACTION, WAIT)
	StepType string `json:"stepType"`

	// TargetExecutions List of targets that are expected to be effected by this action. This list may change in case targets aren't available at the specific time of execution
	TargetExecutions *[]TargetExecutionAO `json:"targetExecutions,omitempty"`

	// TotalTargetCount Amount of targets that are effect int total
	TotalTargetCount *int64 `json:"totalTargetCount,omitempty"`
}

ExperimentExecutionStepActionAO An action-step that is executed as part of an experiment.

type ExperimentExecutionStepActionAOActionKind

type ExperimentExecutionStepActionAOActionKind string

ExperimentExecutionStepActionAOActionKind Kind of the action (e.g. attack, check, loadtest)

Defines values for ExperimentExecutionStepActionAOActionKind.

type ExperimentExecutionStepWaitAO

type ExperimentExecutionStepWaitAO struct {
	// CustomLabel Custom label assigned during experiment design to express the intention of this step
	CustomLabel *string `json:"customLabel,omitempty"`

	// Ended Timestamp when this experiment step ended
	Ended *time.Time `json:"ended,omitempty"`

	// Id Unique identifier of this step execution
	Id *openapi_types.UUID `json:"id,omitempty"`

	// IgnoreFailure Whether the experiment should fail/error immediately in case this step fails/errors.
	IgnoreFailure *bool `json:"ignoreFailure,omitempty"`

	// Parameters Step-specific parameters of the experiment step configuration
	Parameters *map[string]interface{} `json:"parameters,omitempty"`

	// PredecessorId Unique identifier of the step execution that precedes this step, null if it is the first step of a lane
	PredecessorId *openapi_types.UUID `json:"predecessorId,omitempty"`

	// Reason Reason in case this experiment step execution failed or errored
	Reason *string `json:"reason,omitempty"`

	// Started Timestamp when this experiment step was started
	Started *time.Time `json:"started,omitempty"`

	// State Current state of this step in the experiment (e.g. RUNNING, FAILED, ERRORED, COMPLETED)
	State *string `json:"state,omitempty"`

	// StepType Type of this step execution (e.g. ACTION, WAIT)
	StepType string `json:"stepType"`
}

ExperimentExecutionStepWaitAO A wait step that is executed as part of an experiment.

type ExperimentExecutionVariableAO

type ExperimentExecutionVariableAO struct {
	Origin *ExperimentExecutionVariableAOOrigin `json:"origin,omitempty"`
	Value  *string                              `json:"value,omitempty"`
}

ExperimentExecutionVariableAO Variables and their origins that have been used for this execution

type ExperimentExecutionVariableAOOrigin

type ExperimentExecutionVariableAOOrigin string

ExperimentExecutionVariableAOOrigin defines model for ExperimentExecutionVariableAO.Origin.

const (
	ExperimentExecutionVariableAOOriginENVIRONMENT ExperimentExecutionVariableAOOrigin = "ENVIRONMENT"
	ExperimentExecutionVariableAOOriginEXECUTION   ExperimentExecutionVariableAOOrigin = "EXECUTION"
	ExperimentExecutionVariableAOOriginEXPERIMENT  ExperimentExecutionVariableAOOrigin = "EXPERIMENT"
	ExperimentExecutionVariableAOOriginSCHEDULE    ExperimentExecutionVariableAOOrigin = "SCHEDULE"
)

Defines values for ExperimentExecutionVariableAOOrigin.

type MutatingEndpointReference

type MutatingEndpointReference struct {
	Method MutatingHttpMethod `json:"method"`

	// Path Absolute path of the HTTP endpoint.
	Path string `json:"path"`
}

MutatingEndpointReference HTTP endpoint which the Steadybit platform/agent could communicate with.

type MutatingEndpointReferenceWithCallInterval

type MutatingEndpointReferenceWithCallInterval struct {
	// CallInterval At what frequency should the state endpoint be called? Takes durations in the format of `100ms` or `10s`.
	CallInterval *string            `json:"callInterval,omitempty"`
	Method       MutatingHttpMethod `json:"method"`

	// Path Absolute path of the HTTP endpoint.
	Path string `json:"path"`
}

MutatingEndpointReferenceWithCallInterval defines model for MutatingEndpointReferenceWithCallInterval.

type MutatingHttpMethod

type MutatingHttpMethod string

MutatingHttpMethod defines model for MutatingHttpMethod.

const (
	DELETE MutatingHttpMethod = "DELETE"
	POST   MutatingHttpMethod = "POST"
	PUT    MutatingHttpMethod = "PUT"
)

Defines values for MutatingHttpMethod.

type PreflightDescription

type PreflightDescription struct {
	// Cancel HTTP endpoint which the Steadybit platform/agent could communicate with.
	Cancel *MutatingEndpointReference `json:"cancel,omitempty"`

	// Description Description for end-users to help them understand what the preflight is doing.
	Description string `json:"description"`

	// Icon An icon that is used to identify your preflight in the ui. Needs to be a data-uri containing an image.
	Icon *string `json:"icon,omitempty"`

	// Id A technical ID that is used to uniquely identify this type of preflight. You will typically want to use something like `org.example.my-fancy-preflight`.
	Id string `json:"id"`

	// Label A human-readable label for the preflight.
	Label string `json:"label"`

	// Start HTTP endpoint which the Steadybit platform/agent could communicate with.
	Start MutatingEndpointReference `json:"start"`

	// Status HTTP endpoint which the Steadybit platform/agent could communicate with.
	Status MutatingEndpointReferenceWithCallInterval `json:"status"`

	// TargetAttributeIncludes A list of attributes of targets that are populated to the preflight in the experiment execution. If the list is empty, no attributes are populated.
	TargetAttributeIncludes []string `json:"targetAttributeIncludes"`

	// Version The version of the preflight. Remember to increase the value everytime you update the definitions. The platform will ignore any definition changes with the same preflight version. We do recommend usage of semver strings.
	Version string `json:"version"`
}

PreflightDescription Provides details about a possible preflight, e.g., what configuration options it has, how to present it to end-users and how to trigger the preflight.

type PreflightKitError

type PreflightKitError struct {
	// Detail A human-readable explanation specific to this occurrence of the problem.
	Detail *string `json:"detail,omitempty"`

	// Instance A URI reference that identifies the specific occurrence of the problem.
	Instance *string `json:"instance,omitempty"`

	// Status * failed - The preflight has detected some failures, for example a failing test which has been implemented by the preflight. The preflight will be canceled, if this status is returned by the status endpoint. * errored - There was a technical error while executing the preflight. Will be marked as red in the platform. The preflight will be canceled, if this status is returned by the status endpoint.
	Status *PreflightKitErrorStatus `json:"status,omitempty"`

	// Title A short, human-readable summary of the problem type.
	Title string `json:"title"`

	// Type A URI reference that identifies the problem type.
	Type *string `json:"type,omitempty"`
}

PreflightKitError An enhanced version of RFC 7807 Problem Details for HTTP APIs compliant response body for error scenarios

type PreflightKitErrorStatus

type PreflightKitErrorStatus string

PreflightKitErrorStatus * failed - The preflight has detected some failures, for example a failing test which has been implemented by the preflight. The preflight will be canceled, if this status is returned by the status endpoint. * errored - There was a technical error while executing the preflight. Will be marked as red in the platform. The preflight will be canceled, if this status is returned by the status endpoint.

const (
	Errored PreflightKitErrorStatus = "errored"
	Failed  PreflightKitErrorStatus = "failed"
)

Defines values for PreflightKitErrorStatus.

type PreflightList

type PreflightList struct {
	Preflights []DescribingEndpointReference `json:"preflights"`
}

PreflightList Lists all preflights that the platform/agent could execute.

type PreflightListResponse

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

PreflightListResponse defines model for PreflightListResponse.

func (PreflightListResponse) AsPreflightKitError

func (t PreflightListResponse) AsPreflightKitError() (PreflightKitError, error)

AsPreflightKitError returns the union data inside the PreflightListResponse as a PreflightKitError

func (PreflightListResponse) AsPreflightList

func (t PreflightListResponse) AsPreflightList() (PreflightList, error)

AsPreflightList returns the union data inside the PreflightListResponse as a PreflightList

func (*PreflightListResponse) FromPreflightKitError

func (t *PreflightListResponse) FromPreflightKitError(v PreflightKitError) error

FromPreflightKitError overwrites any union data inside the PreflightListResponse as the provided PreflightKitError

func (*PreflightListResponse) FromPreflightList

func (t *PreflightListResponse) FromPreflightList(v PreflightList) error

FromPreflightList overwrites any union data inside the PreflightListResponse as the provided PreflightList

func (PreflightListResponse) MarshalJSON

func (t PreflightListResponse) MarshalJSON() ([]byte, error)

func (*PreflightListResponse) MergePreflightKitError

func (t *PreflightListResponse) MergePreflightKitError(v PreflightKitError) error

MergePreflightKitError performs a merge with any union data inside the PreflightListResponse, using the provided PreflightKitError

func (*PreflightListResponse) MergePreflightList

func (t *PreflightListResponse) MergePreflightList(v PreflightList) error

MergePreflightList performs a merge with any union data inside the PreflightListResponse, using the provided PreflightList

func (*PreflightListResponse) UnmarshalJSON

func (t *PreflightListResponse) UnmarshalJSON(b []byte) error

type PreflightState added in v1.3.0

type PreflightState map[string]interface{}

PreflightState Any kind of action specific state that will be passed to the next endpoints.

type PreflightStatusResponse

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

PreflightStatusResponse defines model for PreflightStatusResponse.

func (PreflightStatusResponse) AsPreflightKitError

func (t PreflightStatusResponse) AsPreflightKitError() (PreflightKitError, error)

AsPreflightKitError returns the union data inside the PreflightStatusResponse as a PreflightKitError

func (PreflightStatusResponse) AsStatusResult

func (t PreflightStatusResponse) AsStatusResult() (StatusResult, error)

AsStatusResult returns the union data inside the PreflightStatusResponse as a StatusResult

func (*PreflightStatusResponse) FromPreflightKitError

func (t *PreflightStatusResponse) FromPreflightKitError(v PreflightKitError) error

FromPreflightKitError overwrites any union data inside the PreflightStatusResponse as the provided PreflightKitError

func (*PreflightStatusResponse) FromStatusResult

func (t *PreflightStatusResponse) FromStatusResult(v StatusResult) error

FromStatusResult overwrites any union data inside the PreflightStatusResponse as the provided StatusResult

func (PreflightStatusResponse) MarshalJSON

func (t PreflightStatusResponse) MarshalJSON() ([]byte, error)

func (*PreflightStatusResponse) MergePreflightKitError

func (t *PreflightStatusResponse) MergePreflightKitError(v PreflightKitError) error

MergePreflightKitError performs a merge with any union data inside the PreflightStatusResponse, using the provided PreflightKitError

func (*PreflightStatusResponse) MergeStatusResult

func (t *PreflightStatusResponse) MergeStatusResult(v StatusResult) error

MergeStatusResult performs a merge with any union data inside the PreflightStatusResponse, using the provided StatusResult

func (*PreflightStatusResponse) UnmarshalJSON

func (t *PreflightStatusResponse) UnmarshalJSON(b []byte) error

type ReadHttpMethod

type ReadHttpMethod string

ReadHttpMethod defines model for ReadHttpMethod.

const (
	GET ReadHttpMethod = "GET"
)

Defines values for ReadHttpMethod.

type StartPreflightRequestBody

type StartPreflightRequestBody struct {
	// ExperimentExecution A single experiment execution that was triggered from a single experiment.
	ExperimentExecution        ExperimentExecutionAO `json:"experimentExecution"`
	PreflightActionExecutionId uuid.UUID             `json:"preflightActionExecutionId"`
}

StartPreflightRequestBody defines model for StartPreflightRequestBody.

type StartPreflightResponse

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

StartPreflightResponse defines model for StartPreflightResponse.

func (StartPreflightResponse) AsPreflightKitError

func (t StartPreflightResponse) AsPreflightKitError() (PreflightKitError, error)

AsPreflightKitError returns the union data inside the StartPreflightResponse as a PreflightKitError

func (StartPreflightResponse) AsStartResult

func (t StartPreflightResponse) AsStartResult() (StartResult, error)

AsStartResult returns the union data inside the StartPreflightResponse as a StartResult

func (*StartPreflightResponse) FromPreflightKitError

func (t *StartPreflightResponse) FromPreflightKitError(v PreflightKitError) error

FromPreflightKitError overwrites any union data inside the StartPreflightResponse as the provided PreflightKitError

func (*StartPreflightResponse) FromStartResult

func (t *StartPreflightResponse) FromStartResult(v StartResult) error

FromStartResult overwrites any union data inside the StartPreflightResponse as the provided StartResult

func (StartPreflightResponse) MarshalJSON

func (t StartPreflightResponse) MarshalJSON() ([]byte, error)

func (*StartPreflightResponse) MergePreflightKitError

func (t *StartPreflightResponse) MergePreflightKitError(v PreflightKitError) error

MergePreflightKitError performs a merge with any union data inside the StartPreflightResponse, using the provided PreflightKitError

func (*StartPreflightResponse) MergeStartResult

func (t *StartPreflightResponse) MergeStartResult(v StartResult) error

MergeStartResult performs a merge with any union data inside the StartPreflightResponse, using the provided StartResult

func (*StartPreflightResponse) UnmarshalJSON

func (t *StartPreflightResponse) UnmarshalJSON(b []byte) error

type StartResult

type StartResult struct {
	// Error An enhanced version of RFC 7807 Problem Details for HTTP APIs compliant response body for error scenarios
	Error *PreflightKitError `json:"error,omitempty"`

	// Modifications A list of execution modifications (e.g. property updates) Any of
	//   - `preflight_kit_api.ExecutionModificationSetPropertyValue`
	//   - `preflight_kit_api.ExecutionModificationAddValueToListProperty`
	Modifications *ExecutionModifications `json:"modifications,omitempty"`

	// State Any kind of action specific state that will be passed to the next endpoints.
	State PreflightState `json:"state"`

	// Summary A short summary that will be displayed in the experiment execution details.
	Summary *Summary `json:"summary,omitempty"`
}

StartResult defines model for StartResult.

type StatusPreflightRequestBody

type StatusPreflightRequestBody struct {
	PreflightActionExecutionId uuid.UUID `json:"preflightActionExecutionId"`

	// State Any kind of action specific state that will be passed to the next endpoints.
	State PreflightState `json:"state"`
}

StatusPreflightRequestBody defines model for StatusPreflightRequestBody.

type StatusResult

type StatusResult struct {
	// Completed the agent will continue to poll the status endpoint as long as completed is false and no error is set
	Completed bool `json:"completed"`

	// Error An enhanced version of RFC 7807 Problem Details for HTTP APIs compliant response body for error scenarios
	Error *PreflightKitError `json:"error,omitempty"`

	// Modifications A list of execution modifications (e.g. property updates) Any of
	//   - `preflight_kit_api.ExecutionModificationSetPropertyValue`
	//   - `preflight_kit_api.ExecutionModificationAddValueToListProperty`
	Modifications *ExecutionModifications `json:"modifications,omitempty"`

	// State Any kind of action specific state that will be passed to the next endpoints.
	State *PreflightState `json:"state,omitempty"`

	// Summary A short summary that will be displayed in the experiment execution details.
	Summary *Summary `json:"summary,omitempty"`
}

StatusResult defines model for StatusResult.

type Summary added in v1.4.1

type Summary struct {
	// Level The severity level of the summary.
	Level SummaryLevel `json:"level"`

	// Text The text to be displayed in the summary.
	Text string `json:"text"`
}

Summary A short summary that will be displayed in the experiment execution details.

type SummaryLevel added in v1.4.1

type SummaryLevel string

SummaryLevel The severity level of the summary.

const (
	SummaryLevelInfo    SummaryLevel = "info"
	SummaryLevelWarning SummaryLevel = "warning"
)

Defines values for SummaryLevel.

type TargetExecutionAO added in v1.2.0

type TargetExecutionAO struct {
	// AgentHostname The agent that processed this target-action command and forwarded it to the proper extension instance.
	AgentHostname *string `json:"agentHostname,omitempty"`

	// Attributes A set of attributes that have been discovered for this target. A key may be associated multiple time to a single target.
	Attributes *[]AttributeAO `json:"attributes,omitempty"`

	// Name Identifier of the target that is expected to be effected
	Name *string `json:"name,omitempty"`

	// Reason Reason on a per target-level why the experiment failed or errored. If this step didn't failed or errored (`state != 'FAILED' and state != 'ERRORED') the reason is `null`.
	Reason *string `json:"reason,omitempty"`

	// ReasonDetails Optional additional reason details on a per target-level why the the experiment failed or errored.
	ReasonDetails *string `json:"reasonDetails,omitempty"`

	// Source The source (i.e. call to the extension) that caused the step to error or fail.
	Source *string `json:"source,omitempty"`

	// State State of this specific step on a per target-level.
	State *string `json:"state,omitempty"`

	// Summary A summary for a target execution
	Summary *TargetExecutionSummaryAO `json:"summary,omitempty"`

	// Type Type of the target that is expected to be effected
	Type *string `json:"type,omitempty"`
}

TargetExecutionAO A target that is expected to be effected by this action.

type TargetExecutionSummaryAO added in v1.4.2

type TargetExecutionSummaryAO struct {
	Level *string `json:"level,omitempty"`
	Text  *string `json:"text,omitempty"`
}

TargetExecutionSummaryAO A summary for a target execution

type TargetPredicate

type TargetPredicate = map[string]interface{}

TargetPredicate Query defining the overall superset of targets being effected

type UserSummaryAO

type UserSummaryAO struct {
	Email *string `json:"email,omitempty"`

	// Name Name of the user
	Name       *string `json:"name,omitempty"`
	PictureUrl *string `json:"pictureUrl,omitempty"`

	// Username Username of the user, internal identifier of Steadybit
	Username string `json:"username"`
}

UserSummaryAO The user that connected the hub

Jump to

Keyboard shortcuts

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