Documentation ¶
Index ¶
- Constants
- func Comment(comment string)
- func Decrypt(content []byte) ([]byte, error)
- func Deserialize(context *InputContext) error
- func DeserializeTask(properties []PropertyDefinition, taskInstance any) error
- func Encrypt(content []byte) ([]byte, error)
- func HandleAbort(result map[string]interface{})
- func HandleError(err error, result map[string]interface{}, records []interface{})
- func HandleSuccess(result map[string]interface{}, records interface{})
- func Serialize(result map[string]interface{})
- func SerializeError(err error, result map[string]interface{})
- func Status(status string)
- func UnmarshalProperties(properties []PropertyDefinition, prototype interface{}) error
- type AbortError
- type AbortGenerator
- type AutomatedTaskAsUserContext
- type BoolGenerator
- type BuildRecord
- type BuildRecordBuilder
- func (r *BuildRecordBuilder) Build() *BuildRecord
- func (r *BuildRecordBuilder) BuildLabel(build string) *BuildRecordBuilder
- func (r *BuildRecordBuilder) BuildUrl(buildUrl string) *BuildRecordBuilder
- func (r *BuildRecordBuilder) Duration(duration string) *BuildRecordBuilder
- func (r *BuildRecordBuilder) EndDate(endDate time.Time) *BuildRecordBuilder
- func (r *BuildRecordBuilder) Outcome(outcome string) *BuildRecordBuilder
- func (r *BuildRecordBuilder) Project(project string) *BuildRecordBuilder
- func (r *BuildRecordBuilder) StartDate(startDate time.Time) *BuildRecordBuilder
- type CodeComplianceRecord
- type CodeComplianceRecordBuilder
- func (r *CodeComplianceRecordBuilder) AnalysisDate(date time.Time) *CodeComplianceRecordBuilder
- func (r *CodeComplianceRecordBuilder) Build() *CodeComplianceRecord
- func (r *CodeComplianceRecordBuilder) ComplianceData(data string) *CodeComplianceRecordBuilder
- func (r *CodeComplianceRecordBuilder) Outcome(outcome string) *CodeComplianceRecordBuilder
- func (r *CodeComplianceRecordBuilder) Project(project string) *CodeComplianceRecordBuilder
- func (r *CodeComplianceRecordBuilder) ProjectUrl(projectUrl string) *CodeComplianceRecordBuilder
- type ComposedProperty
- type DateGenerator
- type DeploymentRecord
- type DeploymentRecordBuilder
- func (r *DeploymentRecordBuilder) ApplicationVersion(deploymentVersion string) *DeploymentRecordBuilder
- func (r *DeploymentRecordBuilder) Build() *DeploymentRecord
- func (r *DeploymentRecordBuilder) DeployedApplication(deployedApplication string) *DeploymentRecordBuilder
- func (r *DeploymentRecordBuilder) DeploymentEnvironment(deploymentEnvironment string) *DeploymentRecordBuilder
- func (r *DeploymentRecordBuilder) DeploymentPackage(deploymentPackage string) *DeploymentRecordBuilder
- func (r *DeploymentRecordBuilder) DeploymentStatus(status DeploymentStatus) *DeploymentRecordBuilder
- func (r *DeploymentRecordBuilder) TaskId(taskId string) *DeploymentRecordBuilder
- type DeploymentRecordTaskInfo
- type DeploymentStatus
- type ErrorGenerator
- type Generator
- type InputContext
- type IntGenerator
- type ItsmReportingRecord
- type ItsmReportingRecordBuilder
- func (r *ItsmReportingRecordBuilder) Build() *ItsmReportingRecord
- func (r *ItsmReportingRecordBuilder) CreatedBy(createdBy string) *ItsmReportingRecordBuilder
- func (r *ItsmReportingRecordBuilder) Priority(priority string) *ItsmReportingRecordBuilder
- func (r *ItsmReportingRecordBuilder) Record(record string) *ItsmReportingRecordBuilder
- func (r *ItsmReportingRecordBuilder) RecordUrl(recordUrl string) *ItsmReportingRecordBuilder
- func (r *ItsmReportingRecordBuilder) Status(status string) *ItsmReportingRecordBuilder
- func (r *ItsmReportingRecordBuilder) Title(title string) *ItsmReportingRecordBuilder
- type JsonGenerator
- type JsonRawGenerator
- type JsonValueBoolGenerator
- type JsonValueDateGenerator
- type JsonValueGenerator
- type JsonValueNodeGenerator
- type JsonValueStringGenerator
- type LookupResultElement
- type LookupResultElementsGenerator
- type PlanRecord
- type PlanRecordBuilder
- func (r *PlanRecordBuilder) Build() *PlanRecord
- func (r *PlanRecordBuilder) Status(status string) *PlanRecordBuilder
- func (r *PlanRecordBuilder) Ticket(ticket string) *PlanRecordBuilder
- func (r *PlanRecordBuilder) TicketType(ticketType string) *PlanRecordBuilder
- func (r *PlanRecordBuilder) TicketUrl(ticketUrl string) *PlanRecordBuilder
- func (r *PlanRecordBuilder) Title(ticket string) *PlanRecordBuilder
- func (r *PlanRecordBuilder) UpdatedBy(updatedBy string) *PlanRecordBuilder
- func (r *PlanRecordBuilder) UpdatedDate(updatedDate time.Time) *PlanRecordBuilder
- type PropertyDefinition
- type ReleaseContext
- type ReportingRecord
- type ReportingRecordBuilder
- func (b *ReportingRecordBuilder) BuildRecord() *BuildRecordBuilder
- func (b *ReportingRecordBuilder) CodeComplianceRecord() *CodeComplianceRecordBuilder
- func (b *ReportingRecordBuilder) CreatedViaApi(apiFlag bool) *ReportingRecordBuilder
- func (b *ReportingRecordBuilder) CreationDate(date time.Time) *ReportingRecordBuilder
- func (b *ReportingRecordBuilder) DeploymentRecord() *DeploymentRecordBuilder
- func (b *ReportingRecordBuilder) Id(id string) *ReportingRecordBuilder
- func (b *ReportingRecordBuilder) ItsmReportingRecord() *ItsmReportingRecordBuilder
- func (b *ReportingRecordBuilder) PlanRecord() *PlanRecordBuilder
- func (b *ReportingRecordBuilder) RetryAttemptNumber(retry int32) *ReportingRecordBuilder
- func (b *ReportingRecordBuilder) ServerUrl(serverUrl string) *ReportingRecordBuilder
- func (b *ReportingRecordBuilder) ServerUser(serverUser string) *ReportingRecordBuilder
- func (b *ReportingRecordBuilder) TargetId(targetId string) *ReportingRecordBuilder
- type ReportingRecordType
- type Result
- func (r *Result) Aborted(result *Result) *Result
- func (r *Result) Bool(resultField string, result bool) *Result
- func (r *Result) CustomValue(generator Generator) *Result
- func (r *Result) Date(resultField string, dateTime time.Time) *Result
- func (r *Result) DateString(resultField string, sampleFormat string, dateTime string) *Result
- func (r *Result) Error(err error) *Result
- func (r *Result) Get() (map[string]interface{}, error)
- func (r *Result) GetRecords() []interface{}
- func (r *Result) Int(resultField string, result int) *Result
- func (r *Result) Json(resultField string, jsonPayload json.RawMessage) *Result
- func (r *Result) JsonBool(resultField string, jqOp string, jsonPayload json.RawMessage) *Result
- func (r *Result) JsonDate(resultField string, jqOp string, sampleFormat string, ...) *Result
- func (r *Result) JsonNode(resultField string, jqOp string, jsonPayload json.RawMessage) *Result
- func (r *Result) JsonRaw(resultField string, jsonPayload json.RawMessage) *Result
- func (r *Result) JsonString(resultField string, jqOp string, jsonPayload json.RawMessage) *Result
- func (r *Result) LookupResultElements(resultField string, lookupResults []LookupResultElement) *Result
- func (r *Result) ReportingRecord(record interface{}) *Result
- func (r *Result) Slice(resultField string, result []interface{}) *Result
- func (r *Result) String(resultField string, result string) *Result
- func (r *Result) StringSlice(resultField string, result []string) *Result
- type SkipResultHandler
- type SliceGenerator
- type StringGenerator
- type StringSliceGenerator
- type TaskContext
- type TaskOutputContext
Constants ¶
const ( // DefaultResponseResultField is the default output property result field DefaultResponseResultField = "commandResponse" // SecureResponseResultField is the output property result field that is not shown in the UI SecureResponseResultField = "secureResponse" )
const CallbackURL = "CALLBACK_URL"
CallbackURL represents the environment variable for the callback URL.
const InputCategory = "input"
InputCategory represents the category of input properties.
const InputContextSecret = "INPUT_CONTEXT_SECRET"
InputContextSecret represents the environment variable for the input context secret.
const InputContextSecretDataFetchUrlKey = "fetchUrl"
InputContextSecretDataFetchUrlKey represents the key for Fetching task content URL in the input context secret. This
const InputContextSecretDataInput = "input"
InputContextSecretDataInput represents the key for input data in the input context secret.
const InputContextSecretDataSessionKey = "session-key"
InputContextSecretDataSessionKey represents the key for session key in the input context secret.
const InputContextSecretDataUrlKey = "url"
InputContextSecretDataUrlKey represents the key for URL in the input context secret.
const InputContextSecretExecutionIdKey = "execution-id"
InputContextSecretExecutionIdKey represents the key for execution ID in the input context secret.
const InputLocation = "INPUT_LOCATION"
InputLocation represents the environment variable for input location.
const OutputCategory = "output"
OutputCategory represents the category of output properties.
const OutputLocation = "OUTPUT_LOCATION"
OutputLocation represents the environment variable for output location.
const ReleaseURL = "RELEASE_URL"
ReleaseURL represents the environment variable for the release URL.
const ResultSecretName = "RESULT_SECRET_NAME"
ResultSecretName represents the name of the result secret.
const RunnerNamespace = "RUNNER_NAMESPACE"
RunnerNamespace represents the environment variable for the runner namespace.
const SessionKey = "SESSION_KEY"
SessionKey represents the environment variable for the session key.
const SizeOf1Mb = 1024 * 1024
Variables ¶
This section is empty.
Functions ¶
func Deserialize ¶
func Deserialize(context *InputContext) error
Deserialize deserializes the input context from the specified source into the provided InputContext object.
func DeserializeTask ¶
func DeserializeTask(properties []PropertyDefinition, taskInstance any) error
DeserializeTask deserializes the input properties into the provided task instance.
func HandleAbort ¶ added in v0.2.37
func HandleAbort(result map[string]interface{})
func HandleError ¶
HandleError handles task execution error by processing the result, error message and reporting records.
func HandleSuccess ¶
func HandleSuccess(result map[string]interface{}, records interface{})
HandleSuccess handles successful task execution by processing the result and reporting records.
func Serialize ¶
func Serialize(result map[string]interface{})
Serialize serializes the provided result into the output properties.
func SerializeError ¶
SerializeError serializes the provided error and result into the output properties.
func UnmarshalProperties ¶
func UnmarshalProperties(properties []PropertyDefinition, prototype interface{}) error
UnmarshalProperties unmarshalls the input properties into the provided prototype object.
Types ¶
type AbortError ¶ added in v0.2.37
type AbortError struct{}
func (*AbortError) Error ¶ added in v0.2.37
func (e *AbortError) Error() string
type AbortGenerator ¶ added in v0.2.37
type AbortGenerator struct {
// contains filtered or unexported fields
}
The AbortGenerator - used to represent aborted execution result
func (AbortGenerator) FieldName ¶ added in v0.2.37
func (gen AbortGenerator) FieldName() string
func (AbortGenerator) GenerateValue ¶ added in v0.2.37
func (gen AbortGenerator) GenerateValue() (interface{}, error)
type AutomatedTaskAsUserContext ¶
type AutomatedTaskAsUserContext struct { Username string `json:"username"` Password string `json:"password"` }
AutomatedTaskAsUserContext represents the context of an automated task as a user with credentials.
type BoolGenerator ¶
type BoolGenerator struct {
// contains filtered or unexported fields
}
BoolGenerator represents a simple boolean value with a custom field name.
func (BoolGenerator) FieldName ¶
func (gen BoolGenerator) FieldName() string
FieldName returns the custom field name for the boolean value.
func (BoolGenerator) GenerateValue ¶
func (gen BoolGenerator) GenerateValue() (interface{}, error)
GenerateValue generates the boolean value.
type BuildRecord ¶ added in v0.2.36
type BuildRecord struct { ReportingRecord Project string `json:"project,omitempty"` Build string `json:"build,omitempty"` Outcome string `json:"outcome,omitempty"` StartDate time.Time `json:"startDate,omitempty"` EndDate time.Time `json:"endDate,omitempty"` Duration string `json:"duration,omitempty"` BuildUrl string `json:"build_url,omitempty"` }
BuildRecord represents the record for build.
type BuildRecordBuilder ¶ added in v0.2.56
type BuildRecordBuilder struct {
// contains filtered or unexported fields
}
func (*BuildRecordBuilder) Build ¶ added in v0.2.56
func (r *BuildRecordBuilder) Build() *BuildRecord
Build builds PlanRecord.
func (*BuildRecordBuilder) BuildLabel ¶ added in v0.2.56
func (r *BuildRecordBuilder) BuildLabel(build string) *BuildRecordBuilder
BuildLabel set Build field to BuildRecord.
func (*BuildRecordBuilder) BuildUrl ¶ added in v0.2.56
func (r *BuildRecordBuilder) BuildUrl(buildUrl string) *BuildRecordBuilder
BuildUrl set Duration field to BuildRecord.
func (*BuildRecordBuilder) Duration ¶ added in v0.2.56
func (r *BuildRecordBuilder) Duration(duration string) *BuildRecordBuilder
Duration set Duration field to BuildRecord.
func (*BuildRecordBuilder) EndDate ¶ added in v0.2.56
func (r *BuildRecordBuilder) EndDate(endDate time.Time) *BuildRecordBuilder
EndDate set EndDate field to BuildRecord.
func (*BuildRecordBuilder) Outcome ¶ added in v0.2.56
func (r *BuildRecordBuilder) Outcome(outcome string) *BuildRecordBuilder
Outcome set Outcome field to BuildRecord.
func (*BuildRecordBuilder) Project ¶ added in v0.2.56
func (r *BuildRecordBuilder) Project(project string) *BuildRecordBuilder
Project set Project field to BuildRecord.
func (*BuildRecordBuilder) StartDate ¶ added in v0.2.56
func (r *BuildRecordBuilder) StartDate(startDate time.Time) *BuildRecordBuilder
StartDate set StartDate field to BuildRecord.
type CodeComplianceRecord ¶ added in v0.2.36
type CodeComplianceRecord struct { ReportingRecord Project string `json:"project,omitempty"` ProjectUrl string `json:"project_url,omitempty"` AnalysisDate time.Time `json:"analysisDate,omitempty"` Outcome string `json:"outcome,omitempty"` ComplianceData string `json:"complianceData,omitempty"` }
CodeComplianceRecord represents the record for code compliance.
type CodeComplianceRecordBuilder ¶ added in v0.2.56
type CodeComplianceRecordBuilder struct {
// contains filtered or unexported fields
}
func (*CodeComplianceRecordBuilder) AnalysisDate ¶ added in v0.2.56
func (r *CodeComplianceRecordBuilder) AnalysisDate(date time.Time) *CodeComplianceRecordBuilder
AnalysisDate set AnalysisDate field to CodeComplianceRecord.
func (*CodeComplianceRecordBuilder) Build ¶ added in v0.2.56
func (r *CodeComplianceRecordBuilder) Build() *CodeComplianceRecord
Build builds CodeComplianceRecord.
func (*CodeComplianceRecordBuilder) ComplianceData ¶ added in v0.2.56
func (r *CodeComplianceRecordBuilder) ComplianceData(data string) *CodeComplianceRecordBuilder
ComplianceData set ComplianceData field to CodeComplianceRecord.
func (*CodeComplianceRecordBuilder) Outcome ¶ added in v0.2.56
func (r *CodeComplianceRecordBuilder) Outcome(outcome string) *CodeComplianceRecordBuilder
Outcome set Outcome field to CodeComplianceRecord.
func (*CodeComplianceRecordBuilder) Project ¶ added in v0.2.56
func (r *CodeComplianceRecordBuilder) Project(project string) *CodeComplianceRecordBuilder
Project set Project field to CodeComplianceRecord.
func (*CodeComplianceRecordBuilder) ProjectUrl ¶ added in v0.2.56
func (r *CodeComplianceRecordBuilder) ProjectUrl(projectUrl string) *CodeComplianceRecordBuilder
ProjectUrl set ProjectUrl field to CodeComplianceRecord.
type ComposedProperty ¶
type ComposedProperty TaskContext
ComposedProperty represents a composed property of a task.
type DateGenerator ¶
type DateGenerator struct {
// contains filtered or unexported fields
}
DateGenerator represents a simple date and time value with a custom field name.
func (DateGenerator) FieldName ¶
func (gen DateGenerator) FieldName() string
FieldName returns the custom field name for the date and time value.
func (DateGenerator) GenerateValue ¶
func (gen DateGenerator) GenerateValue() (interface{}, error)
GenerateValue generates the date and time value.
type DeploymentRecord ¶ added in v0.2.36
type DeploymentRecord struct { ReportingRecord DeploymentTask string `json:"deploymentTask,omitempty"` DeploymentTaskUrl string `json:"deploymentTask_url,omitempty"` ApplicationName string `json:"applicationName,omitempty"` Version string `json:"version,omitempty"` EnvironmentName string `json:"environmentName,omitempty"` Status DeploymentStatus `json:"status,omitempty"` }
DeploymentRecord represents the record for deployment.
func CreateDeploymentRecord ¶ added in v0.2.36
func CreateDeploymentRecord(client *http.HttpClient, taskInfo *DeploymentRecordTaskInfo, status DeploymentStatus) *DeploymentRecord
CreateDeploymentRecord creates a new reporting record for deployment.
type DeploymentRecordBuilder ¶ added in v0.2.56
type DeploymentRecordBuilder struct {
// contains filtered or unexported fields
}
func (*DeploymentRecordBuilder) ApplicationVersion ¶ added in v0.2.56
func (r *DeploymentRecordBuilder) ApplicationVersion(deploymentVersion string) *DeploymentRecordBuilder
ApplicationVersion set Version field to DeploymentRecord.
func (*DeploymentRecordBuilder) Build ¶ added in v0.2.56
func (r *DeploymentRecordBuilder) Build() *DeploymentRecord
Build builds CodeComplianceRecord.
func (*DeploymentRecordBuilder) DeployedApplication ¶ added in v0.2.56
func (r *DeploymentRecordBuilder) DeployedApplication(deployedApplication string) *DeploymentRecordBuilder
DeployedApplication set DeployedApplication, DeployedApplication is used as default fallback value.
func (*DeploymentRecordBuilder) DeploymentEnvironment ¶ added in v0.2.56
func (r *DeploymentRecordBuilder) DeploymentEnvironment(deploymentEnvironment string) *DeploymentRecordBuilder
DeploymentEnvironment set DeploymentEnvironment, if deployment package is not empty it will use DeploymentEnvironment value, otherwise deployedApplication will be used to extract environment name from parent path.
func (*DeploymentRecordBuilder) DeploymentPackage ¶ added in v0.2.56
func (r *DeploymentRecordBuilder) DeploymentPackage(deploymentPackage string) *DeploymentRecordBuilder
DeploymentPackage set DeploymentPackage, if DeploymentPackage is not empty it will use extracted application name, otherwise deployedApplication is used as default fallback value.
func (*DeploymentRecordBuilder) DeploymentStatus ¶ added in v0.2.56
func (r *DeploymentRecordBuilder) DeploymentStatus(status DeploymentStatus) *DeploymentRecordBuilder
DeploymentStatus set Status field to DeploymentRecord.
func (*DeploymentRecordBuilder) TaskId ¶ added in v0.2.56
func (r *DeploymentRecordBuilder) TaskId(taskId string) *DeploymentRecordBuilder
TaskId set DeploymentTask field to DeploymentRecord, if taskId parameter is empty string "None" is used as default value.
type DeploymentRecordTaskInfo ¶ added in v0.2.36
type DeploymentRecordTaskInfo struct { TaskId string DeploymentPackage string DeploymentEnvironment string DeploymentVersion string DeploymentApplication string DeployedApplication string Username string ReleaseTaskId string }
DeploymentRecordTaskInfo represents properties of deployment needed for audit record.
type DeploymentStatus ¶ added in v0.2.36
type DeploymentStatus string
DeploymentStatus represents the status of the deployment.
const ( Planned DeploymentStatus = "planned" InProgress DeploymentStatus = "in_progress" Completed DeploymentStatus = "completed" Skipped DeploymentStatus = "skipped" Failed DeploymentStatus = "failed" Aborted DeploymentStatus = "aborted" )
type ErrorGenerator ¶
type ErrorGenerator struct {
// contains filtered or unexported fields
}
ErrorGenerator represents an error in the standardized response.
func (ErrorGenerator) FieldName ¶
func (gen ErrorGenerator) FieldName() string
FieldName returns the field name for the error.
func (ErrorGenerator) GenerateValue ¶
func (gen ErrorGenerator) GenerateValue() (interface{}, error)
GenerateValue generates the error value.
type InputContext ¶
type InputContext struct { Release ReleaseContext `json:"release"` Task TaskContext `json:"task"` }
InputContext represents the input context of a task.
type IntGenerator ¶
type IntGenerator struct {
// contains filtered or unexported fields
}
IntGenerator represents a simple integer value with a custom field name.
func (IntGenerator) FieldName ¶
func (gen IntGenerator) FieldName() string
FieldName returns the custom field name for the integer value.
func (IntGenerator) GenerateValue ¶
func (gen IntGenerator) GenerateValue() (interface{}, error)
GenerateValue generates the integer value.
type ItsmReportingRecord ¶ added in v0.2.36
type ItsmReportingRecord struct { ReportingRecord Record string `json:"record,omitempty"` RecordUrl string `json:"record_url,omitempty"` Title string `json:"title,omitempty"` Status string `json:"status,omitempty"` Priority string `json:"priority,omitempty"` CreatedBy string `json:"createdBy,omitempty"` }
ItsmReportingRecord represents the record for ITSM.
type ItsmReportingRecordBuilder ¶ added in v0.2.56
type ItsmReportingRecordBuilder struct {
// contains filtered or unexported fields
}
func (*ItsmReportingRecordBuilder) Build ¶ added in v0.2.56
func (r *ItsmReportingRecordBuilder) Build() *ItsmReportingRecord
Build builds ItsmReportingRecord.
func (*ItsmReportingRecordBuilder) CreatedBy ¶ added in v0.2.56
func (r *ItsmReportingRecordBuilder) CreatedBy(createdBy string) *ItsmReportingRecordBuilder
CreatedBy set CreatedBy field to ItsmReportingRecord.
func (*ItsmReportingRecordBuilder) Priority ¶ added in v0.2.56
func (r *ItsmReportingRecordBuilder) Priority(priority string) *ItsmReportingRecordBuilder
Priority set Priority field to ItsmReportingRecord.
func (*ItsmReportingRecordBuilder) Record ¶ added in v0.2.56
func (r *ItsmReportingRecordBuilder) Record(record string) *ItsmReportingRecordBuilder
Record set Record field to ItsmReportingRecord.
func (*ItsmReportingRecordBuilder) RecordUrl ¶ added in v0.2.56
func (r *ItsmReportingRecordBuilder) RecordUrl(recordUrl string) *ItsmReportingRecordBuilder
RecordUrl set RecordUrl field to ItsmReportingRecord.
func (*ItsmReportingRecordBuilder) Status ¶ added in v0.2.56
func (r *ItsmReportingRecordBuilder) Status(status string) *ItsmReportingRecordBuilder
Status set Status field to ItsmReportingRecord.
func (*ItsmReportingRecordBuilder) Title ¶ added in v0.2.56
func (r *ItsmReportingRecordBuilder) Title(title string) *ItsmReportingRecordBuilder
Title set Title field to ItsmReportingRecord.
type JsonGenerator ¶
type JsonGenerator struct {
// contains filtered or unexported fields
}
JsonGenerator represents a JSON value with a custom field name.
func (JsonGenerator) FieldName ¶
func (gen JsonGenerator) FieldName() string
FieldName returns the custom field name for the JSON value.
func (JsonGenerator) GenerateValue ¶
func (gen JsonGenerator) GenerateValue() (interface{}, error)
GenerateValue generates the JSON value.
type JsonRawGenerator ¶
type JsonRawGenerator struct {
// contains filtered or unexported fields
}
JsonRawGenerator represents a raw JSON value with a custom field name.
func (JsonRawGenerator) FieldName ¶
func (gen JsonRawGenerator) FieldName() string
FieldName returns the custom field name for the raw JSON value.
func (JsonRawGenerator) GenerateValue ¶
func (gen JsonRawGenerator) GenerateValue() (interface{}, error)
GenerateValue generates the raw JSON value.
type JsonValueBoolGenerator ¶
type JsonValueBoolGenerator struct {
JsonValueGenerator
}
JsonValueBoolGenerator represents a boolean result on a JSON path given over a JQ command.
func (JsonValueBoolGenerator) GenerateValue ¶
func (gen JsonValueBoolGenerator) GenerateValue() (interface{}, error)
GenerateValue generates the boolean value.
type JsonValueDateGenerator ¶
type JsonValueDateGenerator struct { JsonValueGenerator // contains filtered or unexported fields }
JsonValueDateGenerator represents a date result on a JSON path given over a JQ command.
func (JsonValueDateGenerator) GenerateValue ¶
func (gen JsonValueDateGenerator) GenerateValue() (interface{}, error)
GenerateValue generates the date value.
type JsonValueGenerator ¶
type JsonValueGenerator struct {
// contains filtered or unexported fields
}
JsonValueGenerator is the base struct for all JSON value generators.
func (JsonValueGenerator) FieldName ¶
func (gen JsonValueGenerator) FieldName() string
FieldName returns the field name for the JSON value generator.
type JsonValueNodeGenerator ¶
type JsonValueNodeGenerator struct {
JsonValueGenerator
}
JsonValueNodeGenerator represents a JSON result on a JSON path given over a JQ command.
func (JsonValueNodeGenerator) GenerateValue ¶
func (gen JsonValueNodeGenerator) GenerateValue() (interface{}, error)
GenerateValue generates the JSON value.
type JsonValueStringGenerator ¶
type JsonValueStringGenerator struct {
JsonValueGenerator
}
JsonValueStringGenerator represents a string result on a JSON path given over a JQ command.
func (JsonValueStringGenerator) GenerateValue ¶
func (gen JsonValueStringGenerator) GenerateValue() (interface{}, error)
GenerateValue generates the string value.
type LookupResultElement ¶
LookupResultElement represents an element of a lookup result.
type LookupResultElementsGenerator ¶
type LookupResultElementsGenerator struct {
// contains filtered or unexported fields
}
LookupResultElementsGenerator represents lookup result elements with a custom field name.
func (LookupResultElementsGenerator) FieldName ¶
func (gen LookupResultElementsGenerator) FieldName() string
FieldName returns the custom field name for the lookup result elements value.
func (LookupResultElementsGenerator) GenerateValue ¶
func (gen LookupResultElementsGenerator) GenerateValue() (interface{}, error)
GenerateValue generates the lookup result elements value.
type PlanRecord ¶ added in v0.2.36
type PlanRecord struct { ReportingRecord Ticket string `json:"ticket,omitempty"` TicketUrl string `json:"ticket_url,omitempty"` Title string `json:"title,omitempty"` TicketType string `json:"ticketType,omitempty"` Status string `json:"status,omitempty"` UpdatedDate time.Time `json:"updatedDate,omitempty"` UpdatedBy string `json:"updatedBy,omitempty"` }
PlanRecord represents the record for plan.
type PlanRecordBuilder ¶ added in v0.2.56
type PlanRecordBuilder struct {
// contains filtered or unexported fields
}
func (*PlanRecordBuilder) Build ¶ added in v0.2.56
func (r *PlanRecordBuilder) Build() *PlanRecord
Build builds PlanRecord.
func (*PlanRecordBuilder) Status ¶ added in v0.2.56
func (r *PlanRecordBuilder) Status(status string) *PlanRecordBuilder
Status set Status field to PlanRecord.
func (*PlanRecordBuilder) Ticket ¶ added in v0.2.56
func (r *PlanRecordBuilder) Ticket(ticket string) *PlanRecordBuilder
Ticket set Ticket field to PlanRecord.
func (*PlanRecordBuilder) TicketType ¶ added in v0.2.56
func (r *PlanRecordBuilder) TicketType(ticketType string) *PlanRecordBuilder
TicketType set TicketType field to PlanRecord.
func (*PlanRecordBuilder) TicketUrl ¶ added in v0.2.56
func (r *PlanRecordBuilder) TicketUrl(ticketUrl string) *PlanRecordBuilder
TicketUrl set TicketUrl field to PlanRecord.
func (*PlanRecordBuilder) Title ¶ added in v0.2.56
func (r *PlanRecordBuilder) Title(ticket string) *PlanRecordBuilder
Title set Title field to PlanRecord.
func (*PlanRecordBuilder) UpdatedBy ¶ added in v0.2.56
func (r *PlanRecordBuilder) UpdatedBy(updatedBy string) *PlanRecordBuilder
UpdatedBy set UpdatedBy field to PlanRecord.
func (*PlanRecordBuilder) UpdatedDate ¶ added in v0.2.56
func (r *PlanRecordBuilder) UpdatedDate(updatedDate time.Time) *PlanRecordBuilder
UpdatedDate set UpdatedDate field to PlanRecord.
type PropertyDefinition ¶
type PropertyDefinition struct { Name string `json:"name"` Value json.RawMessage `json:"value"` Kind string `json:"kind"` Category string `json:"category"` IsPassword bool `json:"password"` }
PropertyDefinition represents the definition of a task property.
type ReleaseContext ¶
type ReleaseContext struct { Id string `json:"id"` AutomatedTaskAsUser AutomatedTaskAsUserContext `json:"automatedTaskAsUser"` Url string `json:"url"` }
ReleaseContext represents the context of a release.
type ReportingRecord ¶ added in v0.2.36
type ReportingRecord struct { Id string `json:"id"` Type ReportingRecordType `json:"type"` TargetId string `json:"targetId,omitempty"` ServerUrl string `json:"serverUrl,omitempty"` ServerUser string `json:"serverUser,omitempty"` CreationDate time.Time `json:"creationDate,omitempty"` RetryAttemptNumber int32 `json:"retryAttemptNumber,omitempty"` CreatedViaApi bool `json:"createdViaApi,omitempty"` }
ReportingRecord represents the record produced by task.
type ReportingRecordBuilder ¶ added in v0.2.56
type ReportingRecordBuilder struct {
// contains filtered or unexported fields
}
ReportingRecordBuilder builder helper type for ReportingRecord.
func NewReportingRecord ¶ added in v0.2.56
func NewReportingRecord() *ReportingRecordBuilder
NewReportingRecord create builder with empty ReportingRecord.
func (*ReportingRecordBuilder) BuildRecord ¶ added in v0.2.56
func (b *ReportingRecordBuilder) BuildRecord() *BuildRecordBuilder
BuildRecord create empty BuildRecord.
func (*ReportingRecordBuilder) CodeComplianceRecord ¶ added in v0.2.56
func (b *ReportingRecordBuilder) CodeComplianceRecord() *CodeComplianceRecordBuilder
func (*ReportingRecordBuilder) CreatedViaApi ¶ added in v0.2.56
func (b *ReportingRecordBuilder) CreatedViaApi(apiFlag bool) *ReportingRecordBuilder
CreatedViaApi mark flag if the record was created via API to ReportingRecord.
func (*ReportingRecordBuilder) CreationDate ¶ added in v0.2.56
func (b *ReportingRecordBuilder) CreationDate(date time.Time) *ReportingRecordBuilder
CreationDate set CreationDate to ReportingRecord.
func (*ReportingRecordBuilder) DeploymentRecord ¶ added in v0.2.56
func (b *ReportingRecordBuilder) DeploymentRecord() *DeploymentRecordBuilder
DeploymentRecord create empty DeploymentRecord.
func (*ReportingRecordBuilder) Id ¶ added in v0.2.56
func (b *ReportingRecordBuilder) Id(id string) *ReportingRecordBuilder
Id set Id to ReportingRecord.
func (*ReportingRecordBuilder) ItsmReportingRecord ¶ added in v0.2.56
func (b *ReportingRecordBuilder) ItsmReportingRecord() *ItsmReportingRecordBuilder
ItsmReportingRecord return empty ItsmReportingRecord for ReportingRecord.
func (*ReportingRecordBuilder) PlanRecord ¶ added in v0.2.56
func (b *ReportingRecordBuilder) PlanRecord() *PlanRecordBuilder
PlanRecord create empty PlanRecord.
func (*ReportingRecordBuilder) RetryAttemptNumber ¶ added in v0.2.56
func (b *ReportingRecordBuilder) RetryAttemptNumber(retry int32) *ReportingRecordBuilder
RetryAttemptNumber set number of retry attempts to ReportingRecord.
func (*ReportingRecordBuilder) ServerUrl ¶ added in v0.2.56
func (b *ReportingRecordBuilder) ServerUrl(serverUrl string) *ReportingRecordBuilder
ServerUrl set ServerUrl to ReportingRecord.
func (*ReportingRecordBuilder) ServerUser ¶ added in v0.2.56
func (b *ReportingRecordBuilder) ServerUser(serverUser string) *ReportingRecordBuilder
ServerUser set ServerUser to ReportingRecord.
func (*ReportingRecordBuilder) TargetId ¶ added in v0.2.56
func (b *ReportingRecordBuilder) TargetId(targetId string) *ReportingRecordBuilder
TargetId set TargetId to ReportingRecord.
type ReportingRecordType ¶ added in v0.2.56
type ReportingRecordType string
ReportingRecordType a string value of synthetic type for ReportingRecord types
const ( DeploymentRecordType ReportingRecordType = "udm.DeploymentRecord" BuildRecordType ReportingRecordType = "udm.BuildRecord" ItsmRecordType ReportingRecordType = "udm.ItsmRecord" PlanRecordType ReportingRecordType = "udm.PlanRecord" CodeComplianceRecordType ReportingRecordType = "udm.CodeComplianceRecord" )
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
Result represents the result of a task execution.
func (*Result) CustomValue ¶
CustomValue provides a custom implementation of the Generator interface, adding a custom parsed or generated value to the result.
func (*Result) DateString ¶
DateString adds a date and time value with a custom format and field name to the result.
func (*Result) GetRecords ¶ added in v0.2.36
func (r *Result) GetRecords() []interface{}
GetRecords returns list of all reporting records
func (*Result) Json ¶
func (r *Result) Json(resultField string, jsonPayload json.RawMessage) *Result
Json adds a JSON value with a custom field name to the result.
func (*Result) JsonBool ¶
JsonBool adds a boolean result on a JSON path given over a JQ command to the result.
func (*Result) JsonDate ¶
func (r *Result) JsonDate(resultField string, jqOp string, sampleFormat string, jsonPayload json.RawMessage) *Result
JsonDate adds a date result on a JSON path given over a JQ command to the result.
func (*Result) JsonNode ¶
JsonNode adds a JSON result on a JSON path given over a JQ command to the result.
func (*Result) JsonRaw ¶
func (r *Result) JsonRaw(resultField string, jsonPayload json.RawMessage) *Result
JsonRaw adds a raw JSON value with a custom field name to the result.
func (*Result) JsonString ¶
JsonString adds a string result on a JSON path given over a JQ command to the result.
func (*Result) LookupResultElements ¶
func (r *Result) LookupResultElements(resultField string, lookupResults []LookupResultElement) *Result
LookupResultElements adds lookup result elements with a custom field name to the result.
func (*Result) ReportingRecord ¶ added in v0.2.36
ReportingRecord adds reporting record to the result.
type SkipResultHandler ¶
type SkipResultHandler struct{}
SkipResultHandler represents a result handler that should be skipped.
func (*SkipResultHandler) Error ¶
func (m *SkipResultHandler) Error() string
Error returns the error message for the SkipResultHandler.
type SliceGenerator ¶
type SliceGenerator struct {
// contains filtered or unexported fields
}
SliceGenerator represents a []interface{} value with a custom field name.
func (SliceGenerator) FieldName ¶
func (gen SliceGenerator) FieldName() string
FieldName returns the custom field name for the []interface{} value.
func (SliceGenerator) GenerateValue ¶
func (gen SliceGenerator) GenerateValue() (interface{}, error)
GenerateValue generates the []interface{} value.
type StringGenerator ¶
type StringGenerator struct {
// contains filtered or unexported fields
}
StringGenerator represents a simple string value with a custom field name.
func (StringGenerator) FieldName ¶
func (gen StringGenerator) FieldName() string
FieldName returns the custom field name for the string value.
func (StringGenerator) GenerateValue ¶
func (gen StringGenerator) GenerateValue() (interface{}, error)
GenerateValue generates the string value.
type StringSliceGenerator ¶
type StringSliceGenerator struct {
// contains filtered or unexported fields
}
StringSliceGenerator represents a []string value with a custom field name.
func (StringSliceGenerator) FieldName ¶
func (gen StringSliceGenerator) FieldName() string
FieldName returns the custom field name for the []string value.
func (StringSliceGenerator) GenerateValue ¶
func (gen StringSliceGenerator) GenerateValue() (interface{}, error)
GenerateValue generates the []string value.
type TaskContext ¶
type TaskContext struct { Id string `json:"id"` Type string `json:"type"` Properties []PropertyDefinition `json:"properties"` }
TaskContext represents the context of a task.
type TaskOutputContext ¶
type TaskOutputContext struct { ExitCode int64 `json:"exitCode"` OutputProperties map[string]interface{} `json:"outputProperties,omitempty"` JobErrorMessage string `json:"jobErrorMessage,omitempty"` ReportingRecords interface{} `json:"reportingRecords,omitempty"` }
TaskOutputContext represents the output context of a task.