Help us shape the future of Go! Take the 2026 Go Developer Survey

worker

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

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

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSpec

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

GetSpec returns the OpenAPI specification corresponding to the generated code in this file. External references in the spec are resolved through PathToRawSpec; externally-referenced files must be embedded in their corresponding Go packages (via the import-mapping feature). URL-based external refs are not supported.

func GetSpecJSON

func GetSpecJSON() ([]byte, error)

GetSpecJSON returns the raw JSON bytes of the embedded OpenAPI specification: decompressed but not unmarshaled. External references are not resolved here; the bytes are the spec exactly as embedded by codegen. The result is cached at package init time, so repeated calls are cheap.

func GetSwagger deprecated

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

GetSwagger returns the OpenAPI specification corresponding to the generated code in this file.

Deprecated: GetSwagger predates kin-openapi renaming openapi3.Swagger to openapi3.T. Use GetSpec instead. This wrapper is retained for backwards compatibility.

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

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 ActionMetadata

type ActionMetadata struct {
	// Action Optional within this object. Identity of the action.
	Action *struct {
		// Application Optional within this object. Service that raises the action, such as `artifactory` or `access`.
		Application *string `json:"application,omitempty"`

		// Name Optional within this object. Action name, one of the values accepted by action on create.
		Name *string `json:"name,omitempty"`
	} `json:"action,omitempty"`

	// Async Optional within this object. True for actions that run after the operation has committed (the AFTER_ actions and SCHEDULED_EVENT), which cannot change its outcome.
	Async *bool `json:"async,omitempty"`

	// Description Optional within this object. What the action is for.
	Description *string `json:"description,omitempty"`

	// ExecutionRequestType Optional within this object. Name of the input type in typesDefinitions, such as BeforeDownloadRequest.
	ExecutionRequestType *string `json:"executionRequestType,omitempty"`

	// FilterType Optional within this object. Which filterCriteria member applies: FILTER_REPO for artifactFilterCriteria, SCHEDULE for schedule. Absent for actions that take no filter.
	FilterType *ActionMetadataFilterType `json:"filterType,omitempty"`

	// MandatoryFilter Optional within this object. When true the action requires the filterCriteria member named by filterType; when absent or false the action rejects a filter.
	MandatoryFilter *bool `json:"mandatoryFilter,omitempty"`

	// RequestSchema Optional within this object. JSON schema of the input as text, when available.
	RequestSchema *string `json:"requestSchema,omitempty"`

	// SampleCode Optional within this object. Example worker script.
	SampleCode *string `json:"sampleCode,omitempty"`

	// SamplePayload Optional within this object. Example input as JSON text.
	SamplePayload *string `json:"samplePayload,omitempty"`

	// SupportProjects Optional within this object. Whether project administrators may create workers for this action.
	SupportProjects *bool `json:"supportProjects,omitempty"`

	// TypesDefinitions Optional within this object. TypeScript declarations of the input and result types. Status enums are numeric (for example DOWNLOAD_PROCEED = 1); workers may return either the number or the member name as a string; both are accepted.
	TypesDefinitions *string `json:"typesDefinitions,omitempty"`

	// WikiUrl Optional within this object. Link to documentation for the action.
	WikiUrl *string `json:"wikiUrl,omitempty"`
}

ActionMetadata Everything needed to write a worker for one action.

type ActionMetadataFilterType

type ActionMetadataFilterType string

ActionMetadataFilterType Optional within this object. Which filterCriteria member applies: FILTER_REPO for artifactFilterCriteria, SCHEDULE for schedule. Absent for actions that take no filter.

const (
	FILTERREPO ActionMetadataFilterType = "FILTER_REPO"
	SCHEDULE   ActionMetadataFilterType = "SCHEDULE"
)

Defines values for ActionMetadataFilterType.

func (ActionMetadataFilterType) Valid

func (e ActionMetadataFilterType) Valid() bool

Valid indicates whether the value is a known member of the ActionMetadataFilterType enum.

type CheckWorkersLiveness200TextResponse

type CheckWorkersLiveness200TextResponse string

func (CheckWorkersLiveness200TextResponse) VisitCheckWorkersLivenessResponse

func (response CheckWorkersLiveness200TextResponse) VisitCheckWorkersLivenessResponse(w http.ResponseWriter) error

type CheckWorkersLivenessRequestObject

type CheckWorkersLivenessRequestObject struct {
}

type CheckWorkersLivenessResponseObject

type CheckWorkersLivenessResponseObject interface {
	VisitCheckWorkersLivenessResponse(w http.ResponseWriter) error
}

type CheckWorkersReadiness200TextResponse

type CheckWorkersReadiness200TextResponse string

func (CheckWorkersReadiness200TextResponse) VisitCheckWorkersReadinessResponse

func (response CheckWorkersReadiness200TextResponse) VisitCheckWorkersReadinessResponse(w http.ResponseWriter) error

type CheckWorkersReadinessRequestObject

type CheckWorkersReadinessRequestObject struct {
}

type CheckWorkersReadinessResponseObject

type CheckWorkersReadinessResponseObject interface {
	VisitCheckWorkersReadinessResponse(w http.ResponseWriter) error
}

type ChiServerOptions

type ChiServerOptions struct {
	BaseURL          string
	BaseRouter       chi.Router
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type CreateWorker201Response

type CreateWorker201Response struct {
}

func (CreateWorker201Response) VisitCreateWorkerResponse

func (response CreateWorker201Response) VisitCreateWorkerResponse(w http.ResponseWriter) error

type CreateWorker400JSONResponse

type CreateWorker400JSONResponse struct{ WorkerBadRequestJSONResponse }

func (CreateWorker400JSONResponse) VisitCreateWorkerResponse

func (response CreateWorker400JSONResponse) VisitCreateWorkerResponse(w http.ResponseWriter) error

type CreateWorker401JSONResponse

type CreateWorker401JSONResponse struct{ WorkerUnauthorizedJSONResponse }

func (CreateWorker401JSONResponse) VisitCreateWorkerResponse

func (response CreateWorker401JSONResponse) VisitCreateWorkerResponse(w http.ResponseWriter) error

type CreateWorker403JSONResponse

type CreateWorker403JSONResponse struct{ WorkerForbiddenJSONResponse }

func (CreateWorker403JSONResponse) VisitCreateWorkerResponse

func (response CreateWorker403JSONResponse) VisitCreateWorkerResponse(w http.ResponseWriter) error

type CreateWorkerJSONRequestBody

type CreateWorkerJSONRequestBody = WorkerCreateRequest

CreateWorkerJSONRequestBody defines body for CreateWorker for application/json ContentType.

type CreateWorkerParams

type CreateWorkerParams struct {
	// ProjectKey Optional query parameter. Project to act for. Required for project administrators, who must also name the same project in the worker.
	ProjectKey *string `form:"projectKey,omitempty" json:"projectKey,omitempty"`
}

CreateWorkerParams defines parameters for CreateWorker.

type CreateWorkerRequestObject

type CreateWorkerRequestObject struct {
	Params CreateWorkerParams
	Body   *CreateWorkerJSONRequestBody
}

type CreateWorkerResponseObject

type CreateWorkerResponseObject interface {
	VisitCreateWorkerResponse(w http.ResponseWriter) error
}

type DeleteWorker204Response

type DeleteWorker204Response struct {
}

func (DeleteWorker204Response) VisitDeleteWorkerResponse

func (response DeleteWorker204Response) VisitDeleteWorkerResponse(w http.ResponseWriter) error

type DeleteWorker401JSONResponse

type DeleteWorker401JSONResponse struct{ WorkerUnauthorizedJSONResponse }

func (DeleteWorker401JSONResponse) VisitDeleteWorkerResponse

func (response DeleteWorker401JSONResponse) VisitDeleteWorkerResponse(w http.ResponseWriter) error

type DeleteWorker403JSONResponse

type DeleteWorker403JSONResponse struct{ WorkerForbiddenJSONResponse }

func (DeleteWorker403JSONResponse) VisitDeleteWorkerResponse

func (response DeleteWorker403JSONResponse) VisitDeleteWorkerResponse(w http.ResponseWriter) error

type DeleteWorker404JSONResponse

type DeleteWorker404JSONResponse struct{ WorkerNotFoundJSONResponse }

func (DeleteWorker404JSONResponse) VisitDeleteWorkerResponse

func (response DeleteWorker404JSONResponse) VisitDeleteWorkerResponse(w http.ResponseWriter) error

type DeleteWorkerRequestObject

type DeleteWorkerRequestObject struct {
	WorkerKey string `json:"workerKey"`
}

type DeleteWorkerResponseObject

type DeleteWorkerResponseObject interface {
	VisitDeleteWorkerResponse(w http.ResponseWriter) error
}

type ErrorResponse

type ErrorResponse struct {
	// Errors Required within this object. One entry per error.
	Errors []struct {
		// Code Required within this object. A symbolic code such as NOT_FOUND.
		Code string `json:"code"`

		// Message Required within this object. Human readable explanation.
		Message string `json:"message"`
	} `json:"errors"`
}

ErrorResponse The error envelope for /worker. For a run stopped by a limit, code carries the errorCode and message the matching errorMessage.

type ExecuteHttpTriggeredWorker200JSONResponse

type ExecuteHttpTriggeredWorker200JSONResponse WorkerExecutionResult

func (ExecuteHttpTriggeredWorker200JSONResponse) VisitExecuteHttpTriggeredWorkerResponse

func (response ExecuteHttpTriggeredWorker200JSONResponse) VisitExecuteHttpTriggeredWorkerResponse(w http.ResponseWriter) error

type ExecuteHttpTriggeredWorker400JSONResponse

type ExecuteHttpTriggeredWorker400JSONResponse struct{ WorkerBadRequestJSONResponse }

func (ExecuteHttpTriggeredWorker400JSONResponse) VisitExecuteHttpTriggeredWorkerResponse

func (response ExecuteHttpTriggeredWorker400JSONResponse) VisitExecuteHttpTriggeredWorkerResponse(w http.ResponseWriter) error

type ExecuteHttpTriggeredWorker401JSONResponse

type ExecuteHttpTriggeredWorker401JSONResponse struct{ WorkerUnauthorizedJSONResponse }

func (ExecuteHttpTriggeredWorker401JSONResponse) VisitExecuteHttpTriggeredWorkerResponse

func (response ExecuteHttpTriggeredWorker401JSONResponse) VisitExecuteHttpTriggeredWorkerResponse(w http.ResponseWriter) error

type ExecuteHttpTriggeredWorker403JSONResponse

type ExecuteHttpTriggeredWorker403JSONResponse struct{ WorkerForbiddenJSONResponse }

func (ExecuteHttpTriggeredWorker403JSONResponse) VisitExecuteHttpTriggeredWorkerResponse

func (response ExecuteHttpTriggeredWorker403JSONResponse) VisitExecuteHttpTriggeredWorkerResponse(w http.ResponseWriter) error

type ExecuteHttpTriggeredWorker404JSONResponse

type ExecuteHttpTriggeredWorker404JSONResponse struct{ WorkerNotFoundJSONResponse }

func (ExecuteHttpTriggeredWorker404JSONResponse) VisitExecuteHttpTriggeredWorkerResponse

func (response ExecuteHttpTriggeredWorker404JSONResponse) VisitExecuteHttpTriggeredWorkerResponse(w http.ResponseWriter) error

type ExecuteHttpTriggeredWorkerJSONRequestBody

type ExecuteHttpTriggeredWorkerJSONRequestBody = WorkerExecutionPayload

ExecuteHttpTriggeredWorkerJSONRequestBody defines body for ExecuteHttpTriggeredWorker for application/json ContentType.

type ExecuteHttpTriggeredWorkerRequestObject

type ExecuteHttpTriggeredWorkerRequestObject struct {
	WorkerKey string `json:"workerKey"`
	Body      *ExecuteHttpTriggeredWorkerJSONRequestBody
}

type ExecuteHttpTriggeredWorkerResponseObject

type ExecuteHttpTriggeredWorkerResponseObject interface {
	VisitExecuteHttpTriggeredWorkerResponse(w http.ResponseWriter) error
}

type ExecuteWorkerTest200JSONResponse

type ExecuteWorkerTest200JSONResponse WorkerTestResult

func (ExecuteWorkerTest200JSONResponse) VisitExecuteWorkerTestResponse

func (response ExecuteWorkerTest200JSONResponse) VisitExecuteWorkerTestResponse(w http.ResponseWriter) error

type ExecuteWorkerTest400JSONResponse

type ExecuteWorkerTest400JSONResponse struct{ WorkerBadRequestJSONResponse }

func (ExecuteWorkerTest400JSONResponse) VisitExecuteWorkerTestResponse

func (response ExecuteWorkerTest400JSONResponse) VisitExecuteWorkerTestResponse(w http.ResponseWriter) error

type ExecuteWorkerTest401JSONResponse

type ExecuteWorkerTest401JSONResponse struct{ WorkerUnauthorizedJSONResponse }

func (ExecuteWorkerTest401JSONResponse) VisitExecuteWorkerTestResponse

func (response ExecuteWorkerTest401JSONResponse) VisitExecuteWorkerTestResponse(w http.ResponseWriter) error

type ExecuteWorkerTest403JSONResponse

type ExecuteWorkerTest403JSONResponse struct{ WorkerForbiddenJSONResponse }

func (ExecuteWorkerTest403JSONResponse) VisitExecuteWorkerTestResponse

func (response ExecuteWorkerTest403JSONResponse) VisitExecuteWorkerTestResponse(w http.ResponseWriter) error

type ExecuteWorkerTest404JSONResponse

type ExecuteWorkerTest404JSONResponse struct{ WorkerNotFoundJSONResponse }

func (ExecuteWorkerTest404JSONResponse) VisitExecuteWorkerTestResponse

func (response ExecuteWorkerTest404JSONResponse) VisitExecuteWorkerTestResponse(w http.ResponseWriter) error

type ExecuteWorkerTestGeneric200JSONResponse

type ExecuteWorkerTestGeneric200JSONResponse WorkerTestResult

func (ExecuteWorkerTestGeneric200JSONResponse) VisitExecuteWorkerTestGenericResponse

func (response ExecuteWorkerTestGeneric200JSONResponse) VisitExecuteWorkerTestGenericResponse(w http.ResponseWriter) error

type ExecuteWorkerTestGeneric400JSONResponse

type ExecuteWorkerTestGeneric400JSONResponse struct{ WorkerBadRequestJSONResponse }

func (ExecuteWorkerTestGeneric400JSONResponse) VisitExecuteWorkerTestGenericResponse

func (response ExecuteWorkerTestGeneric400JSONResponse) VisitExecuteWorkerTestGenericResponse(w http.ResponseWriter) error

type ExecuteWorkerTestGeneric401JSONResponse

type ExecuteWorkerTestGeneric401JSONResponse struct{ WorkerUnauthorizedJSONResponse }

func (ExecuteWorkerTestGeneric401JSONResponse) VisitExecuteWorkerTestGenericResponse

func (response ExecuteWorkerTestGeneric401JSONResponse) VisitExecuteWorkerTestGenericResponse(w http.ResponseWriter) error

type ExecuteWorkerTestGeneric403JSONResponse

type ExecuteWorkerTestGeneric403JSONResponse struct{ WorkerForbiddenJSONResponse }

func (ExecuteWorkerTestGeneric403JSONResponse) VisitExecuteWorkerTestGenericResponse

func (response ExecuteWorkerTestGeneric403JSONResponse) VisitExecuteWorkerTestGenericResponse(w http.ResponseWriter) error

type ExecuteWorkerTestGenericJSONRequestBody

type ExecuteWorkerTestGenericJSONRequestBody = WorkerTestRequest

ExecuteWorkerTestGenericJSONRequestBody defines body for ExecuteWorkerTestGeneric for application/json ContentType.

type ExecuteWorkerTestGenericParams

type ExecuteWorkerTestGenericParams struct {
	// Debug Optional query parameter. When true the run's log lines are kept with the result. Defaults to false.
	Debug *bool `form:"debug,omitempty" json:"debug,omitempty"`
}

ExecuteWorkerTestGenericParams defines parameters for ExecuteWorkerTestGeneric.

type ExecuteWorkerTestGenericRequestObject

type ExecuteWorkerTestGenericRequestObject struct {
	Params ExecuteWorkerTestGenericParams
	Body   *ExecuteWorkerTestGenericJSONRequestBody
}

type ExecuteWorkerTestGenericResponseObject

type ExecuteWorkerTestGenericResponseObject interface {
	VisitExecuteWorkerTestGenericResponse(w http.ResponseWriter) error
}

type ExecuteWorkerTestJSONRequestBody

type ExecuteWorkerTestJSONRequestBody = WorkerTestRequest

ExecuteWorkerTestJSONRequestBody defines body for ExecuteWorkerTest for application/json ContentType.

type ExecuteWorkerTestParams

type ExecuteWorkerTestParams struct {
	// Debug Optional query parameter. When true the run's log lines are kept with the result. Defaults to false.
	Debug *bool `form:"debug,omitempty" json:"debug,omitempty"`
}

ExecuteWorkerTestParams defines parameters for ExecuteWorkerTest.

type ExecuteWorkerTestRequestObject

type ExecuteWorkerTestRequestObject struct {
	WorkerKey string `json:"workerKey"`
	Params    ExecuteWorkerTestParams
	Body      *ExecuteWorkerTestJSONRequestBody
}

type ExecuteWorkerTestResponseObject

type ExecuteWorkerTestResponseObject interface {
	VisitExecuteWorkerTestResponse(w http.ResponseWriter) error
}

type GetWorker200JSONResponse

type GetWorker200JSONResponse Worker

func (GetWorker200JSONResponse) VisitGetWorkerResponse

func (response GetWorker200JSONResponse) VisitGetWorkerResponse(w http.ResponseWriter) error

type GetWorker401JSONResponse

type GetWorker401JSONResponse struct{ WorkerUnauthorizedJSONResponse }

func (GetWorker401JSONResponse) VisitGetWorkerResponse

func (response GetWorker401JSONResponse) VisitGetWorkerResponse(w http.ResponseWriter) error

type GetWorker403JSONResponse

type GetWorker403JSONResponse struct{ WorkerForbiddenJSONResponse }

func (GetWorker403JSONResponse) VisitGetWorkerResponse

func (response GetWorker403JSONResponse) VisitGetWorkerResponse(w http.ResponseWriter) error

type GetWorker404JSONResponse

type GetWorker404JSONResponse struct{ WorkerNotFoundJSONResponse }

func (GetWorker404JSONResponse) VisitGetWorkerResponse

func (response GetWorker404JSONResponse) VisitGetWorkerResponse(w http.ResponseWriter) error

type GetWorkerActions200JSONResponse

type GetWorkerActions200JSONResponse []string

func (GetWorkerActions200JSONResponse) VisitGetWorkerActionsResponse

func (response GetWorkerActions200JSONResponse) VisitGetWorkerActionsResponse(w http.ResponseWriter) error

type GetWorkerActions401JSONResponse

type GetWorkerActions401JSONResponse struct{ WorkerUnauthorizedJSONResponse }

func (GetWorkerActions401JSONResponse) VisitGetWorkerActionsResponse

func (response GetWorkerActions401JSONResponse) VisitGetWorkerActionsResponse(w http.ResponseWriter) error

type GetWorkerActionsMetadata200JSONResponse

type GetWorkerActionsMetadata200JSONResponse []ActionMetadata

func (GetWorkerActionsMetadata200JSONResponse) VisitGetWorkerActionsMetadataResponse

func (response GetWorkerActionsMetadata200JSONResponse) VisitGetWorkerActionsMetadataResponse(w http.ResponseWriter) error

type GetWorkerActionsMetadata401JSONResponse

type GetWorkerActionsMetadata401JSONResponse struct{ WorkerUnauthorizedJSONResponse }

func (GetWorkerActionsMetadata401JSONResponse) VisitGetWorkerActionsMetadataResponse

func (response GetWorkerActionsMetadata401JSONResponse) VisitGetWorkerActionsMetadataResponse(w http.ResponseWriter) error

type GetWorkerActionsMetadata403JSONResponse

type GetWorkerActionsMetadata403JSONResponse struct{ WorkerForbiddenJSONResponse }

func (GetWorkerActionsMetadata403JSONResponse) VisitGetWorkerActionsMetadataResponse

func (response GetWorkerActionsMetadata403JSONResponse) VisitGetWorkerActionsMetadataResponse(w http.ResponseWriter) error

type GetWorkerActionsMetadataParams

type GetWorkerActionsMetadataParams struct {
	// ProjectKey Optional query parameter. Project to act for. Required for project administrators, who must also name the same project in the worker.
	ProjectKey *string `form:"projectKey,omitempty" json:"projectKey,omitempty"`
}

GetWorkerActionsMetadataParams defines parameters for GetWorkerActionsMetadata.

type GetWorkerActionsMetadataRequestObject

type GetWorkerActionsMetadataRequestObject struct {
	Params GetWorkerActionsMetadataParams
}

type GetWorkerActionsMetadataResponseObject

type GetWorkerActionsMetadataResponseObject interface {
	VisitGetWorkerActionsMetadataResponse(w http.ResponseWriter) error
}

type GetWorkerActionsRequestObject

type GetWorkerActionsRequestObject struct {
}

type GetWorkerActionsResponseObject

type GetWorkerActionsResponseObject interface {
	VisitGetWorkerActionsResponse(w http.ResponseWriter) error
}

type GetWorkerExecutionHistory200JSONResponse

type GetWorkerExecutionHistory200JSONResponse []WorkerExecutionHistoryEntry

func (GetWorkerExecutionHistory200JSONResponse) VisitGetWorkerExecutionHistoryResponse

func (response GetWorkerExecutionHistory200JSONResponse) VisitGetWorkerExecutionHistoryResponse(w http.ResponseWriter) error

type GetWorkerExecutionHistory401JSONResponse

type GetWorkerExecutionHistory401JSONResponse struct{ WorkerUnauthorizedJSONResponse }

func (GetWorkerExecutionHistory401JSONResponse) VisitGetWorkerExecutionHistoryResponse

func (response GetWorkerExecutionHistory401JSONResponse) VisitGetWorkerExecutionHistoryResponse(w http.ResponseWriter) error

type GetWorkerExecutionHistory403JSONResponse

type GetWorkerExecutionHistory403JSONResponse struct{ WorkerForbiddenJSONResponse }

func (GetWorkerExecutionHistory403JSONResponse) VisitGetWorkerExecutionHistoryResponse

func (response GetWorkerExecutionHistory403JSONResponse) VisitGetWorkerExecutionHistoryResponse(w http.ResponseWriter) error

type GetWorkerExecutionHistoryParams

type GetWorkerExecutionHistoryParams struct {
	// MaxItems Optional query parameter. Return at most this many entries.
	MaxItems *int `form:"maxItems,omitempty" json:"maxItems,omitempty"`

	// Start Optional query parameter. Exclude executions that started before this time, in epoch milliseconds.
	Start *int64 `form:"start,omitempty" json:"start,omitempty"`

	// End Optional query parameter. Exclude executions that started after this time, in epoch milliseconds.
	End *int64 `form:"end,omitempty" json:"end,omitempty"`

	// WorkerKey Optional query parameter. Only runs of this worker.
	WorkerKey *string `form:"workerKey,omitempty" json:"workerKey,omitempty"`

	// ShowTestRun Optional query parameter. When true, test runs are included. Defaults to false.
	ShowTestRun *bool `form:"showTestRun,omitempty" json:"showTestRun,omitempty"`

	// ProjectKey Optional query parameter. Project scope; required for project administrators.
	ProjectKey *string `form:"projectKey,omitempty" json:"projectKey,omitempty"`
}

GetWorkerExecutionHistoryParams defines parameters for GetWorkerExecutionHistory.

type GetWorkerExecutionHistoryRequestObject

type GetWorkerExecutionHistoryRequestObject struct {
	Params GetWorkerExecutionHistoryParams
}

type GetWorkerExecutionHistoryResponseObject

type GetWorkerExecutionHistoryResponseObject interface {
	VisitGetWorkerExecutionHistoryResponse(w http.ResponseWriter) error
}

type GetWorkerRequestObject

type GetWorkerRequestObject struct {
	WorkerKey string `json:"workerKey"`
}

type GetWorkerResponseObject

type GetWorkerResponseObject interface {
	VisitGetWorkerResponse(w http.ResponseWriter) error
}

type GetWorkerScaffoldTsConfig200JSONResponse

type GetWorkerScaffoldTsConfig200JSONResponse WorkerScaffoldTsConfig

func (GetWorkerScaffoldTsConfig200JSONResponse) VisitGetWorkerScaffoldTsConfigResponse

func (response GetWorkerScaffoldTsConfig200JSONResponse) VisitGetWorkerScaffoldTsConfigResponse(w http.ResponseWriter) error

type GetWorkerScaffoldTsConfig401JSONResponse

type GetWorkerScaffoldTsConfig401JSONResponse struct{ WorkerUnauthorizedJSONResponse }

func (GetWorkerScaffoldTsConfig401JSONResponse) VisitGetWorkerScaffoldTsConfigResponse

func (response GetWorkerScaffoldTsConfig401JSONResponse) VisitGetWorkerScaffoldTsConfigResponse(w http.ResponseWriter) error

type GetWorkerScaffoldTsConfig403JSONResponse

type GetWorkerScaffoldTsConfig403JSONResponse struct{ WorkerForbiddenJSONResponse }

func (GetWorkerScaffoldTsConfig403JSONResponse) VisitGetWorkerScaffoldTsConfigResponse

func (response GetWorkerScaffoldTsConfig403JSONResponse) VisitGetWorkerScaffoldTsConfigResponse(w http.ResponseWriter) error

type GetWorkerScaffoldTsConfigParams

type GetWorkerScaffoldTsConfigParams struct {
	// ProjectKey Optional query parameter. Project to act for. Required for project administrators, who must also name the same project in the worker.
	ProjectKey *string `form:"projectKey,omitempty" json:"projectKey,omitempty"`
}

GetWorkerScaffoldTsConfigParams defines parameters for GetWorkerScaffoldTsConfig.

type GetWorkerScaffoldTsConfigRequestObject

type GetWorkerScaffoldTsConfigRequestObject struct {
	Params GetWorkerScaffoldTsConfigParams
}

type GetWorkerScaffoldTsConfigResponseObject

type GetWorkerScaffoldTsConfigResponseObject interface {
	VisitGetWorkerScaffoldTsConfigResponse(w http.ResponseWriter) error
}

type GetWorkers200JSONResponse

type GetWorkers200JSONResponse []Worker

func (GetWorkers200JSONResponse) VisitGetWorkersResponse

func (response GetWorkers200JSONResponse) VisitGetWorkersResponse(w http.ResponseWriter) error

type GetWorkers401JSONResponse

type GetWorkers401JSONResponse struct{ WorkerUnauthorizedJSONResponse }

func (GetWorkers401JSONResponse) VisitGetWorkersResponse

func (response GetWorkers401JSONResponse) VisitGetWorkersResponse(w http.ResponseWriter) error

type GetWorkers403JSONResponse

type GetWorkers403JSONResponse struct{ WorkerForbiddenJSONResponse }

func (GetWorkers403JSONResponse) VisitGetWorkersResponse

func (response GetWorkers403JSONResponse) VisitGetWorkersResponse(w http.ResponseWriter) error

type GetWorkersRequestObject

type GetWorkersRequestObject struct {
}

type GetWorkersResponseObject

type GetWorkersResponseObject interface {
	VisitGetWorkersResponse(w http.ResponseWriter) error
}

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

func (*RequiredHeaderError) Error

func (e *RequiredHeaderError) Error() string

func (*RequiredHeaderError) Unwrap

func (e *RequiredHeaderError) Unwrap() error

type RequiredParamError

type RequiredParamError struct {
	ParamName string
}

func (*RequiredParamError) Error

func (e *RequiredParamError) Error() string

type RerunWorker200JSONResponse

type RerunWorker200JSONResponse WorkerExecutionResult

func (RerunWorker200JSONResponse) VisitRerunWorkerResponse

func (response RerunWorker200JSONResponse) VisitRerunWorkerResponse(w http.ResponseWriter) error

type RerunWorker400JSONResponse

type RerunWorker400JSONResponse struct{ WorkerBadRequestJSONResponse }

func (RerunWorker400JSONResponse) VisitRerunWorkerResponse

func (response RerunWorker400JSONResponse) VisitRerunWorkerResponse(w http.ResponseWriter) error

type RerunWorker401JSONResponse

type RerunWorker401JSONResponse struct{ WorkerUnauthorizedJSONResponse }

func (RerunWorker401JSONResponse) VisitRerunWorkerResponse

func (response RerunWorker401JSONResponse) VisitRerunWorkerResponse(w http.ResponseWriter) error

type RerunWorker403JSONResponse

type RerunWorker403JSONResponse struct{ WorkerForbiddenJSONResponse }

func (RerunWorker403JSONResponse) VisitRerunWorkerResponse

func (response RerunWorker403JSONResponse) VisitRerunWorkerResponse(w http.ResponseWriter) error

type RerunWorker404JSONResponse

type RerunWorker404JSONResponse struct{ WorkerNotFoundJSONResponse }

func (RerunWorker404JSONResponse) VisitRerunWorkerResponse

func (response RerunWorker404JSONResponse) VisitRerunWorkerResponse(w http.ResponseWriter) error

type RerunWorkerJSONBody

type RerunWorkerJSONBody struct {
	// HistoryEntryId Required within this object. id of the history entry whose input is replayed.
	HistoryEntryId string `json:"historyEntryId"`
}

RerunWorkerJSONBody defines parameters for RerunWorker.

type RerunWorkerJSONRequestBody

type RerunWorkerJSONRequestBody RerunWorkerJSONBody

RerunWorkerJSONRequestBody defines body for RerunWorker for application/json ContentType.

type RerunWorkerParams

type RerunWorkerParams struct {
	// ForceRecord Optional query parameter. Record this run in the history even when the worker has debug false. Defaults to false.
	ForceRecord *bool `form:"forceRecord,omitempty" json:"forceRecord,omitempty"`
}

RerunWorkerParams defines parameters for RerunWorker.

type RerunWorkerRequestObject

type RerunWorkerRequestObject struct {
	WorkerKey string `json:"workerKey"`
	Params    RerunWorkerParams
	Body      *RerunWorkerJSONRequestBody
}

type RerunWorkerResponseObject

type RerunWorkerResponseObject interface {
	VisitRerunWorkerResponse(w http.ResponseWriter) error
}

type ServerInterface

type ServerInterface interface {
	// GetWorkerActions List action names
	// (GET /api/v1/actions)
	GetWorkerActions(w http.ResponseWriter, r *http.Request)
	// ExecuteHttpTriggeredWorker Execute a worker
	// (POST /api/v1/execute/{workerKey})
	ExecuteHttpTriggeredWorker(w http.ResponseWriter, r *http.Request, workerKey string)
	// GetWorkerExecutionHistory List recorded executions
	// (GET /api/v1/execution_history)
	GetWorkerExecutionHistory(w http.ResponseWriter, r *http.Request, params GetWorkerExecutionHistoryParams)
	// RerunWorker Rerun a recorded execution
	// (POST /api/v1/rerun/{workerKey})
	RerunWorker(w http.ResponseWriter, r *http.Request, workerKey string, params RerunWorkerParams)
	// GetWorkerScaffoldTsConfig Get the TypeScript settings
	// (GET /api/v1/scaffold/tsconfig)
	GetWorkerScaffoldTsConfig(w http.ResponseWriter, r *http.Request, params GetWorkerScaffoldTsConfigParams)
	// CheckWorkersLiveness Workers liveness
	// (GET /api/v1/system/liveness)
	CheckWorkersLiveness(w http.ResponseWriter, r *http.Request)
	// CheckWorkersReadiness Workers readiness
	// (GET /api/v1/system/readiness)
	CheckWorkersReadiness(w http.ResponseWriter, r *http.Request)
	// ExecuteWorkerTestGeneric Test an unsaved script
	// (POST /api/v1/test)
	ExecuteWorkerTestGeneric(w http.ResponseWriter, r *http.Request, params ExecuteWorkerTestGenericParams)
	// ExecuteWorkerTest Test a saved worker
	// (POST /api/v1/test/{workerKey})
	ExecuteWorkerTest(w http.ResponseWriter, r *http.Request, workerKey string, params ExecuteWorkerTestParams)
	// GetWorkers List workers
	// (GET /api/v1/workers)
	GetWorkers(w http.ResponseWriter, r *http.Request)
	// CreateWorker Create a worker
	// (POST /api/v1/workers)
	CreateWorker(w http.ResponseWriter, r *http.Request, params CreateWorkerParams)
	// UpdateWorker Update a worker
	// (PUT /api/v1/workers)
	UpdateWorker(w http.ResponseWriter, r *http.Request)
	// DeleteWorker Delete a worker
	// (DELETE /api/v1/workers/{workerKey})
	DeleteWorker(w http.ResponseWriter, r *http.Request, workerKey string)
	// GetWorker Get a worker
	// (GET /api/v1/workers/{workerKey})
	GetWorker(w http.ResponseWriter, r *http.Request, workerKey string)
	// GetWorkerActionsMetadata Describe the actions
	// (GET /api/v2/actions)
	GetWorkerActionsMetadata(w http.ResponseWriter, r *http.Request, params GetWorkerActionsMetadataParams)
}

ServerInterface represents all server handlers.

func NewStrictHandler

func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface

func NewStrictHandlerWithOptions

func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
	ErrorHandlerFunc   func(w http.ResponseWriter, r *http.Request, err error)
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) CheckWorkersLiveness

func (siw *ServerInterfaceWrapper) CheckWorkersLiveness(w http.ResponseWriter, r *http.Request)

CheckWorkersLiveness operation middleware

func (*ServerInterfaceWrapper) CheckWorkersReadiness

func (siw *ServerInterfaceWrapper) CheckWorkersReadiness(w http.ResponseWriter, r *http.Request)

CheckWorkersReadiness operation middleware

func (*ServerInterfaceWrapper) CreateWorker

func (siw *ServerInterfaceWrapper) CreateWorker(w http.ResponseWriter, r *http.Request)

CreateWorker operation middleware

func (*ServerInterfaceWrapper) DeleteWorker

func (siw *ServerInterfaceWrapper) DeleteWorker(w http.ResponseWriter, r *http.Request)

DeleteWorker operation middleware

func (*ServerInterfaceWrapper) ExecuteHttpTriggeredWorker

func (siw *ServerInterfaceWrapper) ExecuteHttpTriggeredWorker(w http.ResponseWriter, r *http.Request)

ExecuteHttpTriggeredWorker operation middleware

func (*ServerInterfaceWrapper) ExecuteWorkerTest

func (siw *ServerInterfaceWrapper) ExecuteWorkerTest(w http.ResponseWriter, r *http.Request)

ExecuteWorkerTest operation middleware

func (*ServerInterfaceWrapper) ExecuteWorkerTestGeneric

func (siw *ServerInterfaceWrapper) ExecuteWorkerTestGeneric(w http.ResponseWriter, r *http.Request)

ExecuteWorkerTestGeneric operation middleware

func (*ServerInterfaceWrapper) GetWorker

func (siw *ServerInterfaceWrapper) GetWorker(w http.ResponseWriter, r *http.Request)

GetWorker operation middleware

func (*ServerInterfaceWrapper) GetWorkerActions

func (siw *ServerInterfaceWrapper) GetWorkerActions(w http.ResponseWriter, r *http.Request)

GetWorkerActions operation middleware

func (*ServerInterfaceWrapper) GetWorkerActionsMetadata

func (siw *ServerInterfaceWrapper) GetWorkerActionsMetadata(w http.ResponseWriter, r *http.Request)

GetWorkerActionsMetadata operation middleware

func (*ServerInterfaceWrapper) GetWorkerExecutionHistory

func (siw *ServerInterfaceWrapper) GetWorkerExecutionHistory(w http.ResponseWriter, r *http.Request)

GetWorkerExecutionHistory operation middleware

func (*ServerInterfaceWrapper) GetWorkerScaffoldTsConfig

func (siw *ServerInterfaceWrapper) GetWorkerScaffoldTsConfig(w http.ResponseWriter, r *http.Request)

GetWorkerScaffoldTsConfig operation middleware

func (*ServerInterfaceWrapper) GetWorkers

func (siw *ServerInterfaceWrapper) GetWorkers(w http.ResponseWriter, r *http.Request)

GetWorkers operation middleware

func (*ServerInterfaceWrapper) RerunWorker

func (siw *ServerInterfaceWrapper) RerunWorker(w http.ResponseWriter, r *http.Request)

RerunWorker operation middleware

func (*ServerInterfaceWrapper) UpdateWorker

func (siw *ServerInterfaceWrapper) UpdateWorker(w http.ResponseWriter, r *http.Request)

UpdateWorker operation middleware

type StrictHTTPServerOptions

type StrictHTTPServerOptions struct {
	RequestErrorHandlerFunc  func(w http.ResponseWriter, r *http.Request, err error)
	ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type StrictHandlerFunc

type StrictHandlerFunc func(ctx context.Context, w http.ResponseWriter, r *http.Request, request any) (any, error)

type StrictMiddlewareFunc

type StrictMiddlewareFunc func(f StrictHandlerFunc, operationID string) StrictHandlerFunc

type StrictServerInterface

type StrictServerInterface interface {
	// GetWorkerActions List action names
	// (GET /api/v1/actions)
	GetWorkerActions(ctx context.Context, request GetWorkerActionsRequestObject) (GetWorkerActionsResponseObject, error)
	// ExecuteHttpTriggeredWorker Execute a worker
	// (POST /api/v1/execute/{workerKey})
	ExecuteHttpTriggeredWorker(ctx context.Context, request ExecuteHttpTriggeredWorkerRequestObject) (ExecuteHttpTriggeredWorkerResponseObject, error)
	// GetWorkerExecutionHistory List recorded executions
	// (GET /api/v1/execution_history)
	GetWorkerExecutionHistory(ctx context.Context, request GetWorkerExecutionHistoryRequestObject) (GetWorkerExecutionHistoryResponseObject, error)
	// RerunWorker Rerun a recorded execution
	// (POST /api/v1/rerun/{workerKey})
	RerunWorker(ctx context.Context, request RerunWorkerRequestObject) (RerunWorkerResponseObject, error)
	// GetWorkerScaffoldTsConfig Get the TypeScript settings
	// (GET /api/v1/scaffold/tsconfig)
	GetWorkerScaffoldTsConfig(ctx context.Context, request GetWorkerScaffoldTsConfigRequestObject) (GetWorkerScaffoldTsConfigResponseObject, error)
	// CheckWorkersLiveness Workers liveness
	// (GET /api/v1/system/liveness)
	CheckWorkersLiveness(ctx context.Context, request CheckWorkersLivenessRequestObject) (CheckWorkersLivenessResponseObject, error)
	// CheckWorkersReadiness Workers readiness
	// (GET /api/v1/system/readiness)
	CheckWorkersReadiness(ctx context.Context, request CheckWorkersReadinessRequestObject) (CheckWorkersReadinessResponseObject, error)
	// ExecuteWorkerTestGeneric Test an unsaved script
	// (POST /api/v1/test)
	ExecuteWorkerTestGeneric(ctx context.Context, request ExecuteWorkerTestGenericRequestObject) (ExecuteWorkerTestGenericResponseObject, error)
	// ExecuteWorkerTest Test a saved worker
	// (POST /api/v1/test/{workerKey})
	ExecuteWorkerTest(ctx context.Context, request ExecuteWorkerTestRequestObject) (ExecuteWorkerTestResponseObject, error)
	// GetWorkers List workers
	// (GET /api/v1/workers)
	GetWorkers(ctx context.Context, request GetWorkersRequestObject) (GetWorkersResponseObject, error)
	// CreateWorker Create a worker
	// (POST /api/v1/workers)
	CreateWorker(ctx context.Context, request CreateWorkerRequestObject) (CreateWorkerResponseObject, error)
	// UpdateWorker Update a worker
	// (PUT /api/v1/workers)
	UpdateWorker(ctx context.Context, request UpdateWorkerRequestObject) (UpdateWorkerResponseObject, error)
	// DeleteWorker Delete a worker
	// (DELETE /api/v1/workers/{workerKey})
	DeleteWorker(ctx context.Context, request DeleteWorkerRequestObject) (DeleteWorkerResponseObject, error)
	// GetWorker Get a worker
	// (GET /api/v1/workers/{workerKey})
	GetWorker(ctx context.Context, request GetWorkerRequestObject) (GetWorkerResponseObject, error)
	// GetWorkerActionsMetadata Describe the actions
	// (GET /api/v2/actions)
	GetWorkerActionsMetadata(ctx context.Context, request GetWorkerActionsMetadataRequestObject) (GetWorkerActionsMetadataResponseObject, error)
}

StrictServerInterface represents all server handlers.

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type Unimplemented

type Unimplemented struct{}

func (Unimplemented) CheckWorkersLiveness

func (_ Unimplemented) CheckWorkersLiveness(w http.ResponseWriter, r *http.Request)

CheckWorkersLiveness Workers liveness (GET /api/v1/system/liveness)

func (Unimplemented) CheckWorkersReadiness

func (_ Unimplemented) CheckWorkersReadiness(w http.ResponseWriter, r *http.Request)

CheckWorkersReadiness Workers readiness (GET /api/v1/system/readiness)

func (Unimplemented) CreateWorker

func (_ Unimplemented) CreateWorker(w http.ResponseWriter, r *http.Request, params CreateWorkerParams)

CreateWorker Create a worker (POST /api/v1/workers)

func (Unimplemented) DeleteWorker

func (_ Unimplemented) DeleteWorker(w http.ResponseWriter, r *http.Request, workerKey string)

DeleteWorker Delete a worker (DELETE /api/v1/workers/{workerKey})

func (Unimplemented) ExecuteHttpTriggeredWorker

func (_ Unimplemented) ExecuteHttpTriggeredWorker(w http.ResponseWriter, r *http.Request, workerKey string)

ExecuteHttpTriggeredWorker Execute a worker (POST /api/v1/execute/{workerKey})

func (Unimplemented) ExecuteWorkerTest

func (_ Unimplemented) ExecuteWorkerTest(w http.ResponseWriter, r *http.Request, workerKey string, params ExecuteWorkerTestParams)

ExecuteWorkerTest Test a saved worker (POST /api/v1/test/{workerKey})

func (Unimplemented) ExecuteWorkerTestGeneric

func (_ Unimplemented) ExecuteWorkerTestGeneric(w http.ResponseWriter, r *http.Request, params ExecuteWorkerTestGenericParams)

ExecuteWorkerTestGeneric Test an unsaved script (POST /api/v1/test)

func (Unimplemented) GetWorker

func (_ Unimplemented) GetWorker(w http.ResponseWriter, r *http.Request, workerKey string)

GetWorker Get a worker (GET /api/v1/workers/{workerKey})

func (Unimplemented) GetWorkerActions

func (_ Unimplemented) GetWorkerActions(w http.ResponseWriter, r *http.Request)

GetWorkerActions List action names (GET /api/v1/actions)

func (Unimplemented) GetWorkerActionsMetadata

func (_ Unimplemented) GetWorkerActionsMetadata(w http.ResponseWriter, r *http.Request, params GetWorkerActionsMetadataParams)

GetWorkerActionsMetadata Describe the actions (GET /api/v2/actions)

func (Unimplemented) GetWorkerExecutionHistory

func (_ Unimplemented) GetWorkerExecutionHistory(w http.ResponseWriter, r *http.Request, params GetWorkerExecutionHistoryParams)

GetWorkerExecutionHistory List recorded executions (GET /api/v1/execution_history)

func (Unimplemented) GetWorkerScaffoldTsConfig

func (_ Unimplemented) GetWorkerScaffoldTsConfig(w http.ResponseWriter, r *http.Request, params GetWorkerScaffoldTsConfigParams)

GetWorkerScaffoldTsConfig Get the TypeScript settings (GET /api/v1/scaffold/tsconfig)

func (Unimplemented) GetWorkers

func (_ Unimplemented) GetWorkers(w http.ResponseWriter, r *http.Request)

GetWorkers List workers (GET /api/v1/workers)

func (Unimplemented) RerunWorker

func (_ Unimplemented) RerunWorker(w http.ResponseWriter, r *http.Request, workerKey string, params RerunWorkerParams)

RerunWorker Rerun a recorded execution (POST /api/v1/rerun/{workerKey})

func (Unimplemented) UpdateWorker

func (_ Unimplemented) UpdateWorker(w http.ResponseWriter, r *http.Request)

UpdateWorker Update a worker (PUT /api/v1/workers)

type UnimplementedStrict

type UnimplementedStrict struct{}

UnimplementedStrict answers 501 for every strict operation. Services embed it and override the operations they implement.

type UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

type UpdateWorker200Response

type UpdateWorker200Response struct {
}

func (UpdateWorker200Response) VisitUpdateWorkerResponse

func (response UpdateWorker200Response) VisitUpdateWorkerResponse(w http.ResponseWriter) error

type UpdateWorker400JSONResponse

type UpdateWorker400JSONResponse struct{ WorkerBadRequestJSONResponse }

func (UpdateWorker400JSONResponse) VisitUpdateWorkerResponse

func (response UpdateWorker400JSONResponse) VisitUpdateWorkerResponse(w http.ResponseWriter) error

type UpdateWorker401JSONResponse

type UpdateWorker401JSONResponse struct{ WorkerUnauthorizedJSONResponse }

func (UpdateWorker401JSONResponse) VisitUpdateWorkerResponse

func (response UpdateWorker401JSONResponse) VisitUpdateWorkerResponse(w http.ResponseWriter) error

type UpdateWorker403JSONResponse

type UpdateWorker403JSONResponse struct{ WorkerForbiddenJSONResponse }

func (UpdateWorker403JSONResponse) VisitUpdateWorkerResponse

func (response UpdateWorker403JSONResponse) VisitUpdateWorkerResponse(w http.ResponseWriter) error

type UpdateWorker404JSONResponse

type UpdateWorker404JSONResponse struct{ WorkerNotFoundJSONResponse }

func (UpdateWorker404JSONResponse) VisitUpdateWorkerResponse

func (response UpdateWorker404JSONResponse) VisitUpdateWorkerResponse(w http.ResponseWriter) error

type UpdateWorkerJSONRequestBody

type UpdateWorkerJSONRequestBody = WorkerUpdateRequest

UpdateWorkerJSONRequestBody defines body for UpdateWorker for application/json ContentType.

type UpdateWorkerRequestObject

type UpdateWorkerRequestObject struct {
	Body *UpdateWorkerJSONRequestBody
}

type UpdateWorkerResponseObject

type UpdateWorkerResponseObject interface {
	VisitUpdateWorkerResponse(w http.ResponseWriter) error
}

type Worker

type Worker struct {
	// Action Optional within this object. The event that runs the worker. BEFORE_ actions run synchronously inside the operation and can veto or alter it; AFTER_ actions run after it has committed; GENERIC_EVENT workers run only when called through the execute operation. The server accepts only the actions it can trigger, which GET /api/v2/actions lists; any other value is rejected with 400.
	Action *string `json:"action,omitempty"`

	// Debug Optional within this object. When true every run is recorded in the execution history; when false, the default, only failed runs are.
	Debug *bool `json:"debug,omitempty"`

	// Description Optional within this object. Free text shown with the worker.
	Description *string `json:"description,omitempty"`

	// Enabled Optional within this object. Whether the worker runs when its event occurs.
	Enabled *bool `json:"enabled,omitempty"`

	// FilterCriteria Optional within this object. Which events trigger the worker. Required for actions whose metadata has mandatoryFilter true, ignored for GENERIC_EVENT.
	FilterCriteria *WorkerFilterCriteria `json:"filterCriteria,omitempty"`

	// Key Optional within this object. Identifier of the worker.
	Key *string `json:"key,omitempty"`

	// ProjectKey Optional within this object. Project that owns the worker; empty for a platform-level worker. Must match the projectKey query parameter when a project administrator makes the call.
	ProjectKey *string `json:"projectKey,omitempty"`

	// Properties Optional within this object. Clear-text settings for the worker, merged by key on update.
	Properties *[]WorkerProperty `json:"properties,omitempty"`

	// Secrets Optional within this object. Secrets for the worker. On update, entries are merged by key; markedForRemoval deletes one. Values are never returned.
	Secrets *[]WorkerSecret `json:"secrets,omitempty"`

	// Shared Optional within this object. When true, users who are not administrators may execute the worker through the execute operation. Only meaningful for GENERIC_EVENT. Defaults to false.
	Shared *bool `json:"shared,omitempty"`

	// SourceCode Optional within this object. The script exactly as last saved.
	SourceCode *string `json:"sourceCode,omitempty"`
}

Worker A worker definition. Source is TypeScript or JavaScript, sent as plain text or as base64:<encoded>, transpiled by esbuild when saved and run by the embedded goja engine. Each execution runs alone in a helper process under these limits: 64 MiB of memory (the run is interrupted on breach and the helper replaced at twice that), 1 s of CPU time, 5 s per platform or HTTP call, 20 s overall, a call stack depth of 100, 100 KiB of JSON input and of result, and source of at most 100,000 characters. Helpers form a pool of min(4, GOMAXPROCS); a run that waits longer than 30 s for a helper fails.

type WorkerBadRequest

type WorkerBadRequest = ErrorResponse

WorkerBadRequest The error envelope for /worker. For a run stopped by a limit, code carries the errorCode and message the matching errorMessage.

type WorkerBadRequestJSONResponse

type WorkerBadRequestJSONResponse ErrorResponse

type WorkerCreateRequest

type WorkerCreateRequest struct {
	// Action Required within this object. The event that runs the worker. BEFORE_ actions run synchronously inside the operation and can veto or alter it; AFTER_ actions run after it has committed; GENERIC_EVENT workers run only when called through the execute operation. SCHEDULED_EVENT workers run on the cron schedule in filterCriteria.schedule. The server accepts only the actions it can trigger, which GET /api/v2/actions lists; any other value is rejected with 400. AFTER_SAVE, BEFORE_UPLOAD_REQUEST, BEFORE_REMOTE_INFO_REQUEST and AFTER_WORKLOAD_STATE_CHANGE_REQUEST are accepted as aliases.
	Action WorkerCreateRequestAction `json:"action"`

	// Debug Optional within this object. When true every run is recorded in the execution history; when false, the default, only failed runs are.
	Debug *bool `json:"debug,omitempty"`

	// Description Optional within this object. Free text shown with the worker.
	Description *string `json:"description,omitempty"`

	// Enabled Required within this object. Whether the worker runs when its event occurs.
	Enabled bool `json:"enabled"`

	// FilterCriteria Optional within this object. Which events trigger the worker. Required for actions whose metadata has mandatoryFilter true, ignored for GENERIC_EVENT.
	FilterCriteria *WorkerFilterCriteria `json:"filterCriteria,omitempty"`

	// Key Required within this object. Identifier of the worker, unique on the instance.
	Key string `json:"key"`

	// ProjectKey Optional within this object. Project that owns the worker; empty for a platform-level worker. Must match the projectKey query parameter when a project administrator makes the call.
	ProjectKey *string `json:"projectKey,omitempty"`

	// Properties Optional within this object. Clear-text settings for the worker, merged by key on update.
	Properties *[]WorkerProperty `json:"properties,omitempty"`

	// Secrets Optional within this object. Secrets for the worker. On update, entries are merged by key; markedForRemoval deletes one. Values are never returned.
	Secrets *[]WorkerSecret `json:"secrets,omitempty"`

	// Shared Optional within this object. When true, users who are not administrators may execute the worker through the execute operation. Only meaningful for GENERIC_EVENT. Defaults to false.
	Shared *bool `json:"shared,omitempty"`

	// SourceCode Required within this object. The worker script, TypeScript or JavaScript, as plain text or as base64:<encoded source>. A script that does not transpile is rejected with 400 and the compiler message.
	SourceCode string `json:"sourceCode"`
}

WorkerCreateRequest A worker definition. Source is TypeScript or JavaScript, sent as plain text or as base64:<encoded>, transpiled by esbuild when saved and run by the embedded goja engine. Each execution runs alone in a helper process under these limits: 64 MiB of memory (the run is interrupted on breach and the helper replaced at twice that), 1 s of CPU time, 5 s per platform or HTTP call, 20 s overall, a call stack depth of 100, 100 KiB of JSON input and of result, and source of at most 100,000 characters. Helpers form a pool of min(4, GOMAXPROCS); a run that waits longer than 30 s for a helper fails.

type WorkerCreateRequestAction

type WorkerCreateRequestAction string

WorkerCreateRequestAction Required within this object. The event that runs the worker. BEFORE_ actions run synchronously inside the operation and can veto or alter it; AFTER_ actions run after it has committed; GENERIC_EVENT workers run only when called through the execute operation. SCHEDULED_EVENT workers run on the cron schedule in filterCriteria.schedule. The server accepts only the actions it can trigger, which GET /api/v2/actions lists; any other value is rejected with 400. AFTER_SAVE, BEFORE_UPLOAD_REQUEST, BEFORE_REMOTE_INFO_REQUEST and AFTER_WORKLOAD_STATE_CHANGE_REQUEST are accepted as aliases.

const (
	WorkerCreateRequestActionAFTERBUILDINFOSAVE              WorkerCreateRequestAction = "AFTER_BUILD_INFO_SAVE"
	WorkerCreateRequestActionAFTERCOPY                       WorkerCreateRequestAction = "AFTER_COPY"
	WorkerCreateRequestActionAFTERCREATE                     WorkerCreateRequestAction = "AFTER_CREATE"
	WorkerCreateRequestActionAFTERDELETE                     WorkerCreateRequestAction = "AFTER_DELETE"
	WorkerCreateRequestActionAFTERDOWNLOAD                   WorkerCreateRequestAction = "AFTER_DOWNLOAD"
	WorkerCreateRequestActionAFTERDOWNLOADERROR              WorkerCreateRequestAction = "AFTER_DOWNLOAD_ERROR"
	WorkerCreateRequestActionAFTERMOVE                       WorkerCreateRequestAction = "AFTER_MOVE"
	WorkerCreateRequestActionAFTERPROPERTYCREATE             WorkerCreateRequestAction = "AFTER_PROPERTY_CREATE"
	WorkerCreateRequestActionAFTERPROPERTYDELETE             WorkerCreateRequestAction = "AFTER_PROPERTY_DELETE"
	WorkerCreateRequestActionAFTERREMOTEDOWNLOAD             WorkerCreateRequestAction = "AFTER_REMOTE_DOWNLOAD"
	WorkerCreateRequestActionAFTERREPOCREATE                 WorkerCreateRequestAction = "AFTER_REPO_CREATE"
	WorkerCreateRequestActionAFTERREPODELETE                 WorkerCreateRequestAction = "AFTER_REPO_DELETE"
	WorkerCreateRequestActionAFTERREPOUPDATE                 WorkerCreateRequestAction = "AFTER_REPO_UPDATE"
	WorkerCreateRequestActionAFTERSAVE                       WorkerCreateRequestAction = "AFTER_SAVE"
	WorkerCreateRequestActionAFTERWORKLOADSTATECHANGE        WorkerCreateRequestAction = "AFTER_WORKLOAD_STATE_CHANGE"
	WorkerCreateRequestActionAFTERWORKLOADSTATECHANGEREQUEST WorkerCreateRequestAction = "AFTER_WORKLOAD_STATE_CHANGE_REQUEST"
	WorkerCreateRequestActionALTALLRESPONSES                 WorkerCreateRequestAction = "ALT_ALL_RESPONSES"
	WorkerCreateRequestActionALTREMOTECONTENT                WorkerCreateRequestAction = "ALT_REMOTE_CONTENT"
	WorkerCreateRequestActionALTREMOTEPATH                   WorkerCreateRequestAction = "ALT_REMOTE_PATH"
	WorkerCreateRequestActionALTRESPONSE                     WorkerCreateRequestAction = "ALT_RESPONSE"
	WorkerCreateRequestActionBEFOREBUILDINFOSAVE             WorkerCreateRequestAction = "BEFORE_BUILD_INFO_SAVE"
	WorkerCreateRequestActionBEFORECOPY                      WorkerCreateRequestAction = "BEFORE_COPY"
	WorkerCreateRequestActionBEFORECREATE                    WorkerCreateRequestAction = "BEFORE_CREATE"
	WorkerCreateRequestActionBEFORECREATETOKEN               WorkerCreateRequestAction = "BEFORE_CREATE_TOKEN"
	WorkerCreateRequestActionBEFOREDELETE                    WorkerCreateRequestAction = "BEFORE_DELETE"
	WorkerCreateRequestActionBEFOREDELETEREPLICATION         WorkerCreateRequestAction = "BEFORE_DELETE_REPLICATION"
	WorkerCreateRequestActionBEFOREDIRECTORYREPLICATION      WorkerCreateRequestAction = "BEFORE_DIRECTORY_REPLICATION"
	WorkerCreateRequestActionBEFOREDOWNLOAD                  WorkerCreateRequestAction = "BEFORE_DOWNLOAD"
	WorkerCreateRequestActionBEFOREDOWNLOADREQUEST           WorkerCreateRequestAction = "BEFORE_DOWNLOAD_REQUEST"
	WorkerCreateRequestActionBEFOREFILEREPLICATION           WorkerCreateRequestAction = "BEFORE_FILE_REPLICATION"
	WorkerCreateRequestActionBEFOREMOVE                      WorkerCreateRequestAction = "BEFORE_MOVE"
	WorkerCreateRequestActionBEFOREPROPERTYCREATE            WorkerCreateRequestAction = "BEFORE_PROPERTY_CREATE"
	WorkerCreateRequestActionBEFOREPROPERTYDELETE            WorkerCreateRequestAction = "BEFORE_PROPERTY_DELETE"
	WorkerCreateRequestActionBEFOREPROPERTYREPLICATION       WorkerCreateRequestAction = "BEFORE_PROPERTY_REPLICATION"
	WorkerCreateRequestActionBEFOREREMOTEDOWNLOAD            WorkerCreateRequestAction = "BEFORE_REMOTE_DOWNLOAD"
	WorkerCreateRequestActionBEFOREREMOTEINFO                WorkerCreateRequestAction = "BEFORE_REMOTE_INFO"
	WorkerCreateRequestActionBEFOREREMOTEINFOREQUEST         WorkerCreateRequestAction = "BEFORE_REMOTE_INFO_REQUEST"
	WorkerCreateRequestActionBEFOREREPOCREATE                WorkerCreateRequestAction = "BEFORE_REPO_CREATE"
	WorkerCreateRequestActionBEFOREREPODELETE                WorkerCreateRequestAction = "BEFORE_REPO_DELETE"
	WorkerCreateRequestActionBEFOREREPOUPDATE                WorkerCreateRequestAction = "BEFORE_REPO_UPDATE"
	WorkerCreateRequestActionBEFOREREVOKETOKEN               WorkerCreateRequestAction = "BEFORE_REVOKE_TOKEN"
	WorkerCreateRequestActionBEFORESTATISTICSREPLICATION     WorkerCreateRequestAction = "BEFORE_STATISTICS_REPLICATION"
	WorkerCreateRequestActionBEFORETOKENEXPIRY               WorkerCreateRequestAction = "BEFORE_TOKEN_EXPIRY"
	WorkerCreateRequestActionBEFOREUPLOAD                    WorkerCreateRequestAction = "BEFORE_UPLOAD"
	WorkerCreateRequestActionBEFOREUPLOADREQUEST             WorkerCreateRequestAction = "BEFORE_UPLOAD_REQUEST"
	WorkerCreateRequestActionGENERICEVENT                    WorkerCreateRequestAction = "GENERIC_EVENT"
	WorkerCreateRequestActionSCHEDULEDEVENT                  WorkerCreateRequestAction = "SCHEDULED_EVENT"
)

Defines values for WorkerCreateRequestAction.

func (WorkerCreateRequestAction) Valid

func (e WorkerCreateRequestAction) Valid() bool

Valid indicates whether the value is a known member of the WorkerCreateRequestAction enum.

type WorkerExecutionHistoryEntry

type WorkerExecutionHistoryEntry struct {
	// EndTimeMillis Optional within this object. When the run ended, epoch milliseconds.
	EndTimeMillis *int64 `json:"endTimeMillis,omitempty"`

	// ErrorCode Optional within this object. Set when the run failed. These codes come with a fixed errorMessage: WORKER_MEMORY_LIMIT ('Worker used too much memory'), WORKER_CPU_LIMIT ('Worker used too much cpu time'), WORKER_EXECUTION_TIMEOUT ('Worker execution timeout'), WORKER_QUEUE_TIMEOUT ('Worker waited for too long in the queue'), WORKER_KILLED ('The worker has been killed unexpectedly'), WORKER_FLOATING_PROMISE ('Floating promises are not allowed. Make sure to await all promises'). WORKER_SCRIPT_ERROR marks an exception thrown by the script, and WORKER_PAYLOAD_TOO_LARGE an input or result over 100 KiB.
	ErrorCode *WorkerExecutionHistoryEntryErrorCode `json:"errorCode,omitempty"`

	// ErrorMessage Optional within this object. Human readable reason for a failed run.
	ErrorMessage *string `json:"errorMessage,omitempty"`

	// ExecutedVersion Optional within this object. Version of the worker that ran, when the worker is versioned.
	ExecutedVersion *string `json:"executedVersion,omitempty"`

	// ExecutionStatus Required within this object. STATUS_SUCCESS, or STATUS_FAILURE for a failed run (see errorCode).
	ExecutionStatus string `json:"executionStatus"`

	// StartTimeMillis Required within this object. When the run started, epoch milliseconds.
	StartTimeMillis int64 `json:"startTimeMillis"`

	// TestRun Optional within this object. True for runs made through the test operations; listed only with showTestRun=true.
	TestRun *bool `json:"testRun,omitempty"`

	// TraceId Optional within this object. Request trace identifier, for correlating with server logs.
	TraceId *string `json:"traceId,omitempty"`

	// TriggeredBy Optional within this object. User or token subject whose operation raised the event, or the scheduler.
	TriggeredBy *string `json:"triggeredBy,omitempty"`

	// WorkerKey Required within this object. The worker that ran.
	WorkerKey string `json:"workerKey"`

	// WorkerProjectKey Optional within this object. Project of the worker; empty at platform level.
	WorkerProjectKey *string `json:"workerProjectKey,omitempty"`

	// WorkerType Optional within this object. The action the worker handles, such as BEFORE_DOWNLOAD.
	WorkerType *string `json:"workerType,omitempty"`
}

WorkerExecutionHistoryEntry One recorded run.

type WorkerExecutionHistoryEntryErrorCode

type WorkerExecutionHistoryEntryErrorCode string

WorkerExecutionHistoryEntryErrorCode Optional within this object. Set when the run failed. These codes come with a fixed errorMessage: WORKER_MEMORY_LIMIT ('Worker used too much memory'), WORKER_CPU_LIMIT ('Worker used too much cpu time'), WORKER_EXECUTION_TIMEOUT ('Worker execution timeout'), WORKER_QUEUE_TIMEOUT ('Worker waited for too long in the queue'), WORKER_KILLED ('The worker has been killed unexpectedly'), WORKER_FLOATING_PROMISE ('Floating promises are not allowed. Make sure to await all promises'). WORKER_SCRIPT_ERROR marks an exception thrown by the script, and WORKER_PAYLOAD_TOO_LARGE an input or result over 100 KiB.

const (
	WorkerExecutionHistoryEntryErrorCodeWORKERCPULIMIT         WorkerExecutionHistoryEntryErrorCode = "WORKER_CPU_LIMIT"
	WorkerExecutionHistoryEntryErrorCodeWORKEREXECUTIONTIMEOUT WorkerExecutionHistoryEntryErrorCode = "WORKER_EXECUTION_TIMEOUT"
	WorkerExecutionHistoryEntryErrorCodeWORKERFLOATINGPROMISE  WorkerExecutionHistoryEntryErrorCode = "WORKER_FLOATING_PROMISE"
	WorkerExecutionHistoryEntryErrorCodeWORKERKILLED           WorkerExecutionHistoryEntryErrorCode = "WORKER_KILLED"
	WorkerExecutionHistoryEntryErrorCodeWORKERMEMORYLIMIT      WorkerExecutionHistoryEntryErrorCode = "WORKER_MEMORY_LIMIT"
	WorkerExecutionHistoryEntryErrorCodeWORKERPAYLOADTOOLARGE  WorkerExecutionHistoryEntryErrorCode = "WORKER_PAYLOAD_TOO_LARGE"
	WorkerExecutionHistoryEntryErrorCodeWORKERQUEUETIMEOUT     WorkerExecutionHistoryEntryErrorCode = "WORKER_QUEUE_TIMEOUT"
	WorkerExecutionHistoryEntryErrorCodeWORKERSCRIPTERROR      WorkerExecutionHistoryEntryErrorCode = "WORKER_SCRIPT_ERROR"
)

Defines values for WorkerExecutionHistoryEntryErrorCode.

func (WorkerExecutionHistoryEntryErrorCode) Valid

Valid indicates whether the value is a known member of the WorkerExecutionHistoryEntryErrorCode enum.

type WorkerExecutionPayload

type WorkerExecutionPayload map[string]interface{}

WorkerExecutionPayload Input handed to the worker as its data argument. Its shape depends on the action; GET /api/v2/actions gives a sample payload and TypeScript types for each one.

type WorkerExecutionResult

type WorkerExecutionResult struct {
	// Data Optional within this object. What the script returned, unchanged. For BEFORE_ actions it carries the decision (status and message) in the shape the action's types define.
	Data *map[string]interface{} `json:"data,omitempty"`

	// ErrorCode Optional within this object. Set when the run failed. These codes come with a fixed errorMessage: WORKER_MEMORY_LIMIT ('Worker used too much memory'), WORKER_CPU_LIMIT ('Worker used too much cpu time'), WORKER_EXECUTION_TIMEOUT ('Worker execution timeout'), WORKER_QUEUE_TIMEOUT ('Worker waited for too long in the queue'), WORKER_KILLED ('The worker has been killed unexpectedly'), WORKER_FLOATING_PROMISE ('Floating promises are not allowed. Make sure to await all promises'). WORKER_SCRIPT_ERROR marks an exception thrown by the script, and WORKER_PAYLOAD_TOO_LARGE an input or result over 100 KiB.
	ErrorCode *WorkerExecutionResultErrorCode `json:"errorCode,omitempty"`

	// ErrorMessage Optional within this object. Human readable reason for a failed run; see errorCode.
	ErrorMessage *string `json:"errorMessage,omitempty"`

	// ExecutionStatus Optional within this object. STATUS_SUCCESS when the script completed, STATUS_FAILURE for a failed run.
	ExecutionStatus      *string                `json:"executionStatus,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

WorkerExecutionResult The outcome of one run: the script's return value under data, and executionStatus.

func (WorkerExecutionResult) Get

func (a WorkerExecutionResult) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for WorkerExecutionResult. Returns the specified element and whether it was found

func (WorkerExecutionResult) MarshalJSON

func (a WorkerExecutionResult) MarshalJSON() ([]byte, error)

Override default JSON handling for WorkerExecutionResult to handle AdditionalProperties

func (*WorkerExecutionResult) Set

func (a *WorkerExecutionResult) Set(fieldName string, value interface{})

Setter for additional properties for WorkerExecutionResult

func (*WorkerExecutionResult) UnmarshalJSON

func (a *WorkerExecutionResult) UnmarshalJSON(b []byte) error

Override default JSON handling for WorkerExecutionResult to handle AdditionalProperties

type WorkerExecutionResultErrorCode

type WorkerExecutionResultErrorCode string

WorkerExecutionResultErrorCode Optional within this object. Set when the run failed. These codes come with a fixed errorMessage: WORKER_MEMORY_LIMIT ('Worker used too much memory'), WORKER_CPU_LIMIT ('Worker used too much cpu time'), WORKER_EXECUTION_TIMEOUT ('Worker execution timeout'), WORKER_QUEUE_TIMEOUT ('Worker waited for too long in the queue'), WORKER_KILLED ('The worker has been killed unexpectedly'), WORKER_FLOATING_PROMISE ('Floating promises are not allowed. Make sure to await all promises'). WORKER_SCRIPT_ERROR marks an exception thrown by the script, and WORKER_PAYLOAD_TOO_LARGE an input or result over 100 KiB.

const (
	WorkerExecutionResultErrorCodeWORKERCPULIMIT         WorkerExecutionResultErrorCode = "WORKER_CPU_LIMIT"
	WorkerExecutionResultErrorCodeWORKEREXECUTIONTIMEOUT WorkerExecutionResultErrorCode = "WORKER_EXECUTION_TIMEOUT"
	WorkerExecutionResultErrorCodeWORKERFLOATINGPROMISE  WorkerExecutionResultErrorCode = "WORKER_FLOATING_PROMISE"
	WorkerExecutionResultErrorCodeWORKERKILLED           WorkerExecutionResultErrorCode = "WORKER_KILLED"
	WorkerExecutionResultErrorCodeWORKERMEMORYLIMIT      WorkerExecutionResultErrorCode = "WORKER_MEMORY_LIMIT"
	WorkerExecutionResultErrorCodeWORKERPAYLOADTOOLARGE  WorkerExecutionResultErrorCode = "WORKER_PAYLOAD_TOO_LARGE"
	WorkerExecutionResultErrorCodeWORKERQUEUETIMEOUT     WorkerExecutionResultErrorCode = "WORKER_QUEUE_TIMEOUT"
	WorkerExecutionResultErrorCodeWORKERSCRIPTERROR      WorkerExecutionResultErrorCode = "WORKER_SCRIPT_ERROR"
)

Defines values for WorkerExecutionResultErrorCode.

func (WorkerExecutionResultErrorCode) Valid

Valid indicates whether the value is a known member of the WorkerExecutionResultErrorCode enum.

type WorkerFilterCriteria

type WorkerFilterCriteria struct {
	// ArtifactFilterCriteria Optional within this object. Selection for artifact and repository actions.
	ArtifactFilterCriteria *struct {
		// AnyFederated Optional within this object. When true, events in every federated repository trigger the worker.
		AnyFederated *bool `json:"anyFederated,omitempty"`

		// AnyLocal Optional within this object. When true, events in every local repository trigger the worker.
		AnyLocal *bool `json:"anyLocal,omitempty"`

		// AnyRemote Optional within this object. When true, events in every remote repository and its cache trigger the worker.
		AnyRemote *bool `json:"anyRemote,omitempty"`

		// ExcludePatterns Optional within this object. Ant patterns of paths that never trigger the worker; empty excludes nothing.
		ExcludePatterns *[]string `json:"excludePatterns,omitempty"`

		// IncludePatterns Optional within this object. Ant patterns of paths that trigger the worker; empty means every path.
		IncludePatterns *[]string `json:"includePatterns,omitempty"`

		// RepoKeys Optional within this object. Repository keys whose events trigger the worker.
		RepoKeys *[]string `json:"repoKeys,omitempty"`
	} `json:"artifactFilterCriteria,omitempty"`

	// Schedule Optional within this object. Cron schedule for SCHEDULED_EVENT workers; required for that action and rejected for others.
	Schedule *struct {
		// Cron Required within this object. Cron expression for when the worker runs.
		Cron string `json:"cron"`

		// Timezone Optional within this object. IANA time zone the expression is evaluated in. Defaults to UTC.
		Timezone *string `json:"timezone,omitempty"`
	} `json:"schedule,omitempty"`
}

WorkerFilterCriteria Selects the events that trigger a worker: artifactFilterCriteria for repository actions whose metadata filterType is FILTER_REPO, schedule for SCHEDULED_EVENT (filterType SCHEDULE). Repository keys and the any* switches combine with OR.

type WorkerForbidden

type WorkerForbidden = ErrorResponse

WorkerForbidden The error envelope for /worker. For a run stopped by a limit, code carries the errorCode and message the matching errorMessage.

type WorkerForbiddenJSONResponse

type WorkerForbiddenJSONResponse ErrorResponse

type WorkerNotFound

type WorkerNotFound = ErrorResponse

WorkerNotFound The error envelope for /worker. For a run stopped by a limit, code carries the errorCode and message the matching errorMessage.

type WorkerNotFoundJSONResponse

type WorkerNotFoundJSONResponse ErrorResponse

type WorkerProperty

type WorkerProperty struct {
	// Key Required within this object. Property name, unique within the worker.
	Key string `json:"key"`

	// MarkedForRemoval Optional within this object. On update, true deletes the property named by key. Defaults to false.
	MarkedForRemoval *bool `json:"markedForRemoval,omitempty"`

	// Value Optional within this object. The property value.
	Value *string `json:"value,omitempty"`
}

WorkerProperty A named clear-text setting available to the worker. Unlike secrets, values are stored and returned as given.

type WorkerScaffoldTsConfig

type WorkerScaffoldTsConfig struct {
	// CompilerOptions Optional within this object. Compiler options matching what esbuild applies when a worker is saved.
	CompilerOptions *map[string]interface{} `json:"compilerOptions,omitempty"`

	// Exclude Optional within this object. Paths excluded from compilation.
	Exclude *[]string `json:"exclude,omitempty"`

	// Include Optional within this object. Glob patterns of the files to compile.
	Include *[]string `json:"include,omitempty"`
}

WorkerScaffoldTsConfig The TypeScript settings worker scripts are compiled with, for editors and local type checking.

type WorkerSecret

type WorkerSecret struct {
	// Key Required within this object. Secret name, unique within the worker.
	Key string `json:"key"`

	// MarkedForRemoval Optional within this object. On update, true deletes the secret named by key. Defaults to false.
	MarkedForRemoval *bool `json:"markedForRemoval,omitempty"`

	// Value Optional within this object. The secret value. Omitted on reads; on update, omitting it keeps the stored value.
	Value *string `json:"value,omitempty"`
}

WorkerSecret A named secret available to the worker as context.secrets.get(key). Values are sealed at rest and never returned.

type WorkerTestRequest

type WorkerTestRequest struct {
	// Action Required within this object. The action whose input and result types apply, such as BEFORE_DOWNLOAD or GENERIC_EVENT.
	Action string `json:"action"`

	// Code Required within this object. The script to run, TypeScript or JavaScript, plain or base64:<encoded>. Import statements are not allowed.
	Code string `json:"code"`

	// Data Required within this object. The input handed to the script as its data argument, in the action's request shape (GET /api/v2/actions gives a sample).
	Data map[string]interface{} `json:"data"`

	// StagedProperties Optional within this object. Properties for this run only, merged over the saved worker's by key.
	StagedProperties *[]WorkerProperty `json:"stagedProperties,omitempty"`

	// StagedSecrets Optional within this object. Secrets for this run only, merged over the saved worker's by key.
	StagedSecrets *[]WorkerSecret `json:"stagedSecrets,omitempty"`
}

WorkerTestRequest A test run of a script. The script runs with the given action and input without being saved; staged secrets and properties overlay the saved worker's when the run names one.

type WorkerTestResult

type WorkerTestResult map[string]WorkerExecutionResult

WorkerTestResult Test run outcome keyed by the action name in lower camel case, for example {"genericEvent": {"data": ..., "executionStatus": "STATUS_SUCCESS"}} for GENERIC_EVENT or beforeDownload for BEFORE_DOWNLOAD.

type WorkerUnauthorized

type WorkerUnauthorized = ErrorResponse

WorkerUnauthorized The error envelope for /worker. For a run stopped by a limit, code carries the errorCode and message the matching errorMessage.

type WorkerUnauthorizedJSONResponse

type WorkerUnauthorizedJSONResponse ErrorResponse

type WorkerUpdateRequest

type WorkerUpdateRequest struct {
	// Action Optional within this object. The event that runs the worker. BEFORE_ actions run synchronously inside the operation and can veto or alter it; AFTER_ actions run after it has committed; GENERIC_EVENT workers run only when called through the execute operation. SCHEDULED_EVENT workers run on the cron schedule in filterCriteria.schedule. The server accepts only the actions it can trigger, which GET /api/v2/actions lists; any other value is rejected with 400. AFTER_SAVE, BEFORE_UPLOAD_REQUEST, BEFORE_REMOTE_INFO_REQUEST and AFTER_WORKLOAD_STATE_CHANGE_REQUEST are accepted as aliases.
	Action *WorkerUpdateRequestAction `json:"action,omitempty"`

	// Debug Optional within this object. When true every run is recorded in the execution history; when false, the default, only failed runs are.
	Debug *bool `json:"debug,omitempty"`

	// Description Optional within this object. Free text shown with the worker.
	Description *string `json:"description,omitempty"`

	// Enabled Optional within this object. Whether the worker runs when its event occurs.
	Enabled *bool `json:"enabled,omitempty"`

	// FilterCriteria Optional within this object. Which events trigger the worker. Required for actions whose metadata has mandatoryFilter true, ignored for GENERIC_EVENT.
	FilterCriteria *WorkerFilterCriteria `json:"filterCriteria,omitempty"`

	// Key Required within this object. Identifier of the worker to update; it cannot be changed.
	Key string `json:"key"`

	// ProjectKey Optional within this object. Project that owns the worker; empty for a platform-level worker. Must match the projectKey query parameter when a project administrator makes the call.
	ProjectKey *string `json:"projectKey,omitempty"`

	// Properties Optional within this object. Clear-text settings for the worker, merged by key on update.
	Properties *[]WorkerProperty `json:"properties,omitempty"`

	// Secrets Optional within this object. Secrets for the worker. On update, entries are merged by key; markedForRemoval deletes one. Values are never returned.
	Secrets *[]WorkerSecret `json:"secrets,omitempty"`

	// Shared Optional within this object. When true, users who are not administrators may execute the worker through the execute operation. Only meaningful for GENERIC_EVENT. Defaults to false.
	Shared *bool `json:"shared,omitempty"`

	// SourceCode Optional within this object. The worker script, TypeScript or JavaScript, as plain text or as base64:<encoded source>. A script that does not transpile is rejected with 400 and the compiler message.
	SourceCode *string `json:"sourceCode,omitempty"`
}

WorkerUpdateRequest A worker definition. Source is TypeScript or JavaScript, sent as plain text or as base64:<encoded>, transpiled by esbuild when saved and run by the embedded goja engine. Each execution runs alone in a helper process under these limits: 64 MiB of memory (the run is interrupted on breach and the helper replaced at twice that), 1 s of CPU time, 5 s per platform or HTTP call, 20 s overall, a call stack depth of 100, 100 KiB of JSON input and of result, and source of at most 100,000 characters. Helpers form a pool of min(4, GOMAXPROCS); a run that waits longer than 30 s for a helper fails.

type WorkerUpdateRequestAction

type WorkerUpdateRequestAction string

WorkerUpdateRequestAction Optional within this object. The event that runs the worker. BEFORE_ actions run synchronously inside the operation and can veto or alter it; AFTER_ actions run after it has committed; GENERIC_EVENT workers run only when called through the execute operation. SCHEDULED_EVENT workers run on the cron schedule in filterCriteria.schedule. The server accepts only the actions it can trigger, which GET /api/v2/actions lists; any other value is rejected with 400. AFTER_SAVE, BEFORE_UPLOAD_REQUEST, BEFORE_REMOTE_INFO_REQUEST and AFTER_WORKLOAD_STATE_CHANGE_REQUEST are accepted as aliases.

const (
	WorkerUpdateRequestActionAFTERBUILDINFOSAVE              WorkerUpdateRequestAction = "AFTER_BUILD_INFO_SAVE"
	WorkerUpdateRequestActionAFTERCOPY                       WorkerUpdateRequestAction = "AFTER_COPY"
	WorkerUpdateRequestActionAFTERCREATE                     WorkerUpdateRequestAction = "AFTER_CREATE"
	WorkerUpdateRequestActionAFTERDELETE                     WorkerUpdateRequestAction = "AFTER_DELETE"
	WorkerUpdateRequestActionAFTERDOWNLOAD                   WorkerUpdateRequestAction = "AFTER_DOWNLOAD"
	WorkerUpdateRequestActionAFTERDOWNLOADERROR              WorkerUpdateRequestAction = "AFTER_DOWNLOAD_ERROR"
	WorkerUpdateRequestActionAFTERMOVE                       WorkerUpdateRequestAction = "AFTER_MOVE"
	WorkerUpdateRequestActionAFTERPROPERTYCREATE             WorkerUpdateRequestAction = "AFTER_PROPERTY_CREATE"
	WorkerUpdateRequestActionAFTERPROPERTYDELETE             WorkerUpdateRequestAction = "AFTER_PROPERTY_DELETE"
	WorkerUpdateRequestActionAFTERREMOTEDOWNLOAD             WorkerUpdateRequestAction = "AFTER_REMOTE_DOWNLOAD"
	WorkerUpdateRequestActionAFTERREPOCREATE                 WorkerUpdateRequestAction = "AFTER_REPO_CREATE"
	WorkerUpdateRequestActionAFTERREPODELETE                 WorkerUpdateRequestAction = "AFTER_REPO_DELETE"
	WorkerUpdateRequestActionAFTERREPOUPDATE                 WorkerUpdateRequestAction = "AFTER_REPO_UPDATE"
	WorkerUpdateRequestActionAFTERSAVE                       WorkerUpdateRequestAction = "AFTER_SAVE"
	WorkerUpdateRequestActionAFTERWORKLOADSTATECHANGE        WorkerUpdateRequestAction = "AFTER_WORKLOAD_STATE_CHANGE"
	WorkerUpdateRequestActionAFTERWORKLOADSTATECHANGEREQUEST WorkerUpdateRequestAction = "AFTER_WORKLOAD_STATE_CHANGE_REQUEST"
	WorkerUpdateRequestActionALTALLRESPONSES                 WorkerUpdateRequestAction = "ALT_ALL_RESPONSES"
	WorkerUpdateRequestActionALTREMOTECONTENT                WorkerUpdateRequestAction = "ALT_REMOTE_CONTENT"
	WorkerUpdateRequestActionALTREMOTEPATH                   WorkerUpdateRequestAction = "ALT_REMOTE_PATH"
	WorkerUpdateRequestActionALTRESPONSE                     WorkerUpdateRequestAction = "ALT_RESPONSE"
	WorkerUpdateRequestActionBEFOREBUILDINFOSAVE             WorkerUpdateRequestAction = "BEFORE_BUILD_INFO_SAVE"
	WorkerUpdateRequestActionBEFORECOPY                      WorkerUpdateRequestAction = "BEFORE_COPY"
	WorkerUpdateRequestActionBEFORECREATE                    WorkerUpdateRequestAction = "BEFORE_CREATE"
	WorkerUpdateRequestActionBEFORECREATETOKEN               WorkerUpdateRequestAction = "BEFORE_CREATE_TOKEN"
	WorkerUpdateRequestActionBEFOREDELETE                    WorkerUpdateRequestAction = "BEFORE_DELETE"
	WorkerUpdateRequestActionBEFOREDELETEREPLICATION         WorkerUpdateRequestAction = "BEFORE_DELETE_REPLICATION"
	WorkerUpdateRequestActionBEFOREDIRECTORYREPLICATION      WorkerUpdateRequestAction = "BEFORE_DIRECTORY_REPLICATION"
	WorkerUpdateRequestActionBEFOREDOWNLOAD                  WorkerUpdateRequestAction = "BEFORE_DOWNLOAD"
	WorkerUpdateRequestActionBEFOREDOWNLOADREQUEST           WorkerUpdateRequestAction = "BEFORE_DOWNLOAD_REQUEST"
	WorkerUpdateRequestActionBEFOREFILEREPLICATION           WorkerUpdateRequestAction = "BEFORE_FILE_REPLICATION"
	WorkerUpdateRequestActionBEFOREMOVE                      WorkerUpdateRequestAction = "BEFORE_MOVE"
	WorkerUpdateRequestActionBEFOREPROPERTYCREATE            WorkerUpdateRequestAction = "BEFORE_PROPERTY_CREATE"
	WorkerUpdateRequestActionBEFOREPROPERTYDELETE            WorkerUpdateRequestAction = "BEFORE_PROPERTY_DELETE"
	WorkerUpdateRequestActionBEFOREPROPERTYREPLICATION       WorkerUpdateRequestAction = "BEFORE_PROPERTY_REPLICATION"
	WorkerUpdateRequestActionBEFOREREMOTEDOWNLOAD            WorkerUpdateRequestAction = "BEFORE_REMOTE_DOWNLOAD"
	WorkerUpdateRequestActionBEFOREREMOTEINFO                WorkerUpdateRequestAction = "BEFORE_REMOTE_INFO"
	WorkerUpdateRequestActionBEFOREREMOTEINFOREQUEST         WorkerUpdateRequestAction = "BEFORE_REMOTE_INFO_REQUEST"
	WorkerUpdateRequestActionBEFOREREPOCREATE                WorkerUpdateRequestAction = "BEFORE_REPO_CREATE"
	WorkerUpdateRequestActionBEFOREREPODELETE                WorkerUpdateRequestAction = "BEFORE_REPO_DELETE"
	WorkerUpdateRequestActionBEFOREREPOUPDATE                WorkerUpdateRequestAction = "BEFORE_REPO_UPDATE"
	WorkerUpdateRequestActionBEFOREREVOKETOKEN               WorkerUpdateRequestAction = "BEFORE_REVOKE_TOKEN"
	WorkerUpdateRequestActionBEFORESTATISTICSREPLICATION     WorkerUpdateRequestAction = "BEFORE_STATISTICS_REPLICATION"
	WorkerUpdateRequestActionBEFORETOKENEXPIRY               WorkerUpdateRequestAction = "BEFORE_TOKEN_EXPIRY"
	WorkerUpdateRequestActionBEFOREUPLOAD                    WorkerUpdateRequestAction = "BEFORE_UPLOAD"
	WorkerUpdateRequestActionBEFOREUPLOADREQUEST             WorkerUpdateRequestAction = "BEFORE_UPLOAD_REQUEST"
	WorkerUpdateRequestActionGENERICEVENT                    WorkerUpdateRequestAction = "GENERIC_EVENT"
	WorkerUpdateRequestActionSCHEDULEDEVENT                  WorkerUpdateRequestAction = "SCHEDULED_EVENT"
)

Defines values for WorkerUpdateRequestAction.

func (WorkerUpdateRequestAction) Valid

func (e WorkerUpdateRequestAction) Valid() bool

Valid indicates whether the value is a known member of the WorkerUpdateRequestAction enum.

Jump to

Keyboard shortcuts

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