Documentation ¶
Index ¶
- Constants
- func ParseEvent(version atc.EventVersion, typ atc.EventType, payload []byte) (atc.Event, error)
- type Envelope
- type Error
- type ErrorV10
- type ErrorV20
- type ErrorV30
- type FinishGet
- type FinishGetV10
- type FinishGetV20
- type FinishGetV30
- type FinishGetV40
- type FinishPut
- type FinishPutV10
- type FinishPutV20
- type FinishPutV30
- type FinishPutV40
- type FinishTask
- type FinishTaskV10
- type FinishTaskV20
- type FinishTaskV30
- type FinishV10
- type GetPlanV40
- type InitializeGetV10
- type InitializePutV10
- type InitializeTask
- type InitializeTaskV10
- type InitializeTaskV20
- type InitializeTaskV30
- type InitializeV10
- type InputV10
- type InputV20
- type InputV20InputPlan
- type LegacyTurbineInput
- type LegacyTurbineOutput
- type Log
- type LogV10
- type LogV20
- type LogV30
- type LogV40
- type LogV50
- type Message
- type Origin
- type OriginID
- type OriginSource
- type OriginV10
- type OriginV10Type
- type OriginV20
- type OriginV20Location
- type OriginV20LocationIncrement
- type OriginV20Source
- type OriginV20Type
- type OriginV30
- type OriginV30Location
- type OriginV30LocationIncrement
- type OriginV30Source
- type OriginV30Type
- type OriginV40
- type OriginV40Location
- type OriginV40LocationIncrement
- type OriginV40Type
- type OutputV10
- type OutputV20
- type OutputV20OutputPlan
- type PutPlanV40
- type StartTask
- type StartTaskV10
- type StartTaskV20
- type StartTaskV30
- type StartTaskV40
- type StartV10
- type Status
- type TaskConfig
- type TaskInputConfig
- type TaskRunConfig
Constants ¶
View Source
const ( // build log (e.g. from input or build execution) EventTypeLog atc.EventType = "log" // build status change (e.g. 'started', 'succeeded') EventTypeStatus atc.EventType = "status" // step initializing EventTypeInitialize atc.EventType = "initialize" // task execution started EventTypeStartTask atc.EventType = "start-task" // task initializing (all inputs fetched; fetching image) EventTypeInitializeTask atc.EventType = "initialize-task" // task execution finished EventTypeFinishTask atc.EventType = "finish-task" // finished getting something EventTypeFinishGet atc.EventType = "finish-get" // finished putting something EventTypeFinishPut atc.EventType = "finish-put" // error occurred EventTypeError atc.EventType = "error" )
Variables ¶
This section is empty.
Functions ¶
func ParseEvent ¶
Types ¶
type Envelope ¶
type Envelope struct { Data *json.RawMessage `json:"data"` Event atc.EventType `json:"event"` Version atc.EventVersion `json:"version"` }
type FinishGet ¶
type FinishGet struct { Origin Origin `json:"origin"` ExitStatus int `json:"exit_status"` FetchedVersion atc.Version `json:"version"` FetchedMetadata []atc.MetadataField `json:"metadata,omitempty"` }
func (FinishGet) Version ¶
func (FinishGet) Version() atc.EventVersion
type FinishGetV10 ¶
type FinishGetV10 struct { Origin OriginV20 `json:"origin"` Plan GetPlanV40 `json:"plan"` ExitStatus int `json:"exit_status"` FetchedVersion atc.Version `json:"version"` FetchedMetadata []atc.MetadataField `json:"metadata,omitempty"` }
func (FinishGetV10) EventType ¶
func (FinishGetV10) EventType() atc.EventType
func (FinishGetV10) Version ¶
func (FinishGetV10) Version() atc.EventVersion
type FinishGetV20 ¶
type FinishGetV20 struct { Origin OriginV30 `json:"origin"` Plan GetPlanV40 `json:"plan"` ExitStatus int `json:"exit_status"` FetchedVersion atc.Version `json:"version"` FetchedMetadata []atc.MetadataField `json:"metadata,omitempty"` }
func (FinishGetV20) EventType ¶
func (FinishGetV20) EventType() atc.EventType
func (FinishGetV20) Version ¶
func (FinishGetV20) Version() atc.EventVersion
type FinishGetV30 ¶
type FinishGetV30 struct { Origin OriginV40 `json:"origin"` Plan GetPlanV40 `json:"plan"` ExitStatus int `json:"exit_status"` FetchedVersion atc.Version `json:"version"` FetchedMetadata []atc.MetadataField `json:"metadata,omitempty"` }
func (FinishGetV30) EventType ¶
func (FinishGetV30) EventType() atc.EventType
func (FinishGetV30) Version ¶
func (FinishGetV30) Version() atc.EventVersion
type FinishGetV40 ¶
type FinishGetV40 struct { Origin Origin `json:"origin"` Plan GetPlanV40 `json:"plan"` ExitStatus int `json:"exit_status"` FetchedVersion atc.Version `json:"version"` FetchedMetadata []atc.MetadataField `json:"metadata,omitempty"` }
func (FinishGetV40) EventType ¶
func (FinishGetV40) EventType() atc.EventType
func (FinishGetV40) Version ¶
func (FinishGetV40) Version() atc.EventVersion
type FinishPut ¶
type FinishPut struct { Origin Origin `json:"origin"` ExitStatus int `json:"exit_status"` CreatedVersion atc.Version `json:"version"` CreatedMetadata []atc.MetadataField `json:"metadata,omitempty"` }
func (FinishPut) Version ¶
func (FinishPut) Version() atc.EventVersion
type FinishPutV10 ¶
type FinishPutV10 struct { Origin OriginV20 `json:"origin"` Plan PutPlanV40 `json:"plan"` CreatedVersion atc.Version `json:"version"` CreatedMetadata []atc.MetadataField `json:"metadata,omitempty"` ExitStatus int `json:"exit_status"` }
func (FinishPutV10) EventType ¶
func (FinishPutV10) EventType() atc.EventType
func (FinishPutV10) Version ¶
func (FinishPutV10) Version() atc.EventVersion
type FinishPutV20 ¶
type FinishPutV20 struct { Origin OriginV30 `json:"origin"` Plan PutPlanV40 `json:"plan"` CreatedVersion atc.Version `json:"version"` CreatedMetadata []atc.MetadataField `json:"metadata,omitempty"` ExitStatus int `json:"exit_status"` }
func (FinishPutV20) EventType ¶
func (FinishPutV20) EventType() atc.EventType
func (FinishPutV20) Version ¶
func (FinishPutV20) Version() atc.EventVersion
type FinishPutV30 ¶
type FinishPutV30 struct { Origin OriginV40 `json:"origin"` Plan PutPlanV40 `json:"plan"` CreatedVersion atc.Version `json:"version"` CreatedMetadata []atc.MetadataField `json:"metadata,omitempty"` ExitStatus int `json:"exit_status"` }
func (FinishPutV30) EventType ¶
func (FinishPutV30) EventType() atc.EventType
func (FinishPutV30) Version ¶
func (FinishPutV30) Version() atc.EventVersion
type FinishPutV40 ¶
type FinishPutV40 struct { Origin Origin `json:"origin"` Plan PutPlanV40 `json:"plan"` CreatedVersion atc.Version `json:"version"` CreatedMetadata []atc.MetadataField `json:"metadata,omitempty"` ExitStatus int `json:"exit_status"` }
func (FinishPutV40) EventType ¶
func (FinishPutV40) EventType() atc.EventType
func (FinishPutV40) Version ¶
func (FinishPutV40) Version() atc.EventVersion
type FinishTask ¶
type FinishTask struct { Time int64 `json:"time"` ExitStatus int `json:"exit_status"` Origin Origin `json:"origin"` }
func (FinishTask) EventType ¶
func (FinishTask) EventType() atc.EventType
func (FinishTask) Version ¶
func (FinishTask) Version() atc.EventVersion
type FinishTaskV10 ¶
type FinishTaskV10 struct { Time int64 `json:"time"` ExitStatus int `json:"exit_status"` Origin OriginV20 `json:"origin"` }
func (FinishTaskV10) EventType ¶
func (FinishTaskV10) EventType() atc.EventType
func (FinishTaskV10) Version ¶
func (FinishTaskV10) Version() atc.EventVersion
type FinishTaskV20 ¶
type FinishTaskV20 struct { Time int64 `json:"time"` ExitStatus int `json:"exit_status"` Origin OriginV30 `json:"origin"` }
func (FinishTaskV20) EventType ¶
func (FinishTaskV20) EventType() atc.EventType
func (FinishTaskV20) Version ¶
func (FinishTaskV20) Version() atc.EventVersion
type FinishTaskV30 ¶
type FinishTaskV30 struct { Time int64 `json:"time"` ExitStatus int `json:"exit_status"` Origin OriginV40 `json:"origin"` }
func (FinishTaskV30) EventType ¶
func (FinishTaskV30) EventType() atc.EventType
func (FinishTaskV30) Version ¶
func (FinishTaskV30) Version() atc.EventVersion
type GetPlanV40 ¶
type InitializeGetV10 ¶
type InitializeGetV10 struct {
Origin Origin `json:"origin"`
}
func (InitializeGetV10) EventType ¶
func (InitializeGetV10) EventType() atc.EventType
func (InitializeGetV10) Version ¶
func (InitializeGetV10) Version() atc.EventVersion
type InitializePutV10 ¶
type InitializePutV10 struct {
Origin Origin `json:"origin"`
}
func (InitializePutV10) EventType ¶
func (InitializePutV10) EventType() atc.EventType
func (InitializePutV10) Version ¶
func (InitializePutV10) Version() atc.EventVersion
type InitializeTask ¶
type InitializeTask struct { Time int64 `json:"time"` Origin Origin `json:"origin"` TaskConfig TaskConfig `json:"config"` }
func (InitializeTask) EventType ¶
func (InitializeTask) EventType() atc.EventType
func (InitializeTask) Version ¶
func (InitializeTask) Version() atc.EventVersion
type InitializeTaskV10 ¶
type InitializeTaskV10 struct { TaskConfig TaskConfig `json:"config"` Origin OriginV20 `json:"origin"` }
func (InitializeTaskV10) EventType ¶
func (InitializeTaskV10) EventType() atc.EventType
func (InitializeTaskV10) Version ¶
func (InitializeTaskV10) Version() atc.EventVersion
type InitializeTaskV20 ¶
type InitializeTaskV20 struct { TaskConfig TaskConfig `json:"config"` Origin OriginV30 `json:"origin"` }
func (InitializeTaskV20) EventType ¶
func (InitializeTaskV20) EventType() atc.EventType
func (InitializeTaskV20) Version ¶
func (InitializeTaskV20) Version() atc.EventVersion
type InitializeTaskV30 ¶
type InitializeTaskV30 struct { TaskConfig TaskConfig `json:"config"` Origin OriginV40 `json:"origin"` }
func (InitializeTaskV30) EventType ¶
func (InitializeTaskV30) EventType() atc.EventType
func (InitializeTaskV30) Version ¶
func (InitializeTaskV30) Version() atc.EventVersion
type InitializeV10 ¶
type InitializeV10 struct {
TaskConfig TaskConfig `json:"config"`
}
func (InitializeV10) EventType ¶
func (InitializeV10) EventType() atc.EventType
func (InitializeV10) Version ¶
func (InitializeV10) Version() atc.EventVersion
type InputV10 ¶
type InputV10 struct {
Input LegacyTurbineInput `json:"input"`
}
func (InputV10) Version ¶
func (InputV10) Version() atc.EventVersion
type InputV20 ¶
type InputV20 struct { Plan InputV20InputPlan `json:"plan"` FetchedVersion atc.Version `json:"version"` FetchedMetadata []atc.MetadataField `json:"metadata,omitempty"` }
func (InputV20) Version ¶
func (InputV20) Version() atc.EventVersion
type InputV20InputPlan ¶
type InputV20InputPlan struct { // logical name of the input with respect to the task's config Name string `json:"name"` // name of resource providing the input Resource string `json:"resource"` // type of resource Type string `json:"type"` // e.g. sha Version atc.Version `json:"version,omitempty"` }
type LegacyTurbineInput ¶
type LegacyTurbineInput struct { Name string `json:"name"` Resource string `json:"resource"` Type string `json:"type"` Version map[string]interface{} `json:"version,omitempty"` Metadata []struct { Name string `json:"name"` Value string `json:"value"` } `json:"metadata,omitempty"` ConfigPath string `json:"config_path"` }
type LegacyTurbineOutput ¶
type Log ¶
type Log struct { Time int64 `json:"time"` Origin Origin `json:"origin"` Payload string `json:"payload"` }
func (Log) Version ¶
func (Log) Version() atc.EventVersion
type Origin ¶
type Origin struct { ID OriginID `json:"id,omitempty"` Source OriginSource `json:"source,omitempty"` }
type OriginSource ¶
type OriginSource string
const ( OriginSourceStdout OriginSource = "stdout" OriginSourceStderr OriginSource = "stderr" )
type OriginV10 ¶
type OriginV10 struct { Type OriginV10Type `json:"type"` Name string `json:"name"` }
type OriginV10Type ¶
type OriginV10Type string
const ( OriginV10TypeInvalid OriginV10Type = "" OriginV10TypeInput OriginV10Type = "input" OriginV10TypeOutput OriginV10Type = "output" OriginV10TypeRun OriginV10Type = "run" )
type OriginV20 ¶
type OriginV20 struct { Name string `json:"name"` Type OriginV20Type `json:"type"` Source OriginV20Source `json:"source"` Location OriginV20Location `json:"location,omitempty"` Substep bool `json:"substep"` Hook string `json:"hook"` }
type OriginV20Location ¶
type OriginV20Location []uint
type OriginV20LocationIncrement ¶
type OriginV20LocationIncrement uint
const ( NoIncrementV10 OriginV20LocationIncrement = 0 SingleIncrementV10 OriginV20LocationIncrement = 1 )
type OriginV20Source ¶
type OriginV20Source string
const ( OriginV20SourceStdout OriginV20Source = "stdout" OriginV20SourceStderr OriginV20Source = "stderr" )
type OriginV20Type ¶
type OriginV20Type string
const ( OriginV20TypeInvalid OriginV20Type = "" OriginV20TypeGet OriginV20Type = "get" OriginV20TypePut OriginV20Type = "put" OriginV20TypeTask OriginV20Type = "task" )
type OriginV30 ¶
type OriginV30 struct { Name string `json:"name"` Type OriginV30Type `json:"type"` Source OriginV30Source `json:"source"` Location OriginV30Location `json:"location,omitempty"` Hook string `json:"hook"` }
type OriginV30Location ¶
type OriginV30LocationIncrement ¶
type OriginV30LocationIncrement uint
const ( NoIncrementV20 OriginV30LocationIncrement = 0 SingleIncrementV20 OriginV30LocationIncrement = 1 )
type OriginV30Source ¶
type OriginV30Source string
const ( OriginV30SourceStdout OriginV30Source = "stdout" OriginV30SourceStderr OriginV30Source = "stderr" )
type OriginV30Type ¶
type OriginV30Type string
const ( OriginV30TypeInvalid OriginV30Type = "" OriginV30TypeGet OriginV30Type = "get" OriginV30TypePut OriginV30Type = "put" OriginV30TypeTask OriginV30Type = "task" )
type OriginV40 ¶
type OriginV40 struct { Name string `json:"name"` Type OriginV40Type `json:"type"` Source OriginSource `json:"source"` Location OriginV40Location `json:"location,omitempty"` }
type OriginV40Location ¶
type OriginV40Location struct { ParentID uint `json:"parent_id"` ID uint `json:"id"` ParallelGroup uint `json:"parallel_group"` SerialGroup uint `json:"serial_group"` Hook string `json:"hook"` }
func (OriginV40Location) Incr ¶
func (ol OriginV40Location) Incr(by OriginV40LocationIncrement) OriginV40Location
func (OriginV40Location) SetParentID ¶
func (ol OriginV40Location) SetParentID(id uint) OriginV40Location
type OriginV40LocationIncrement ¶
type OriginV40LocationIncrement uint
const ( NoIncrementV30 OriginV40LocationIncrement = 0 SingleIncrementV30 OriginV40LocationIncrement = 1 )
type OriginV40Type ¶
type OriginV40Type string
const ( OriginV40TypeInvalid OriginV40Type = "" OriginV40TypeGet OriginV40Type = "get" OriginV40TypePut OriginV40Type = "put" OriginV40TypeTask OriginV40Type = "task" )
type OutputV10 ¶
type OutputV10 struct {
Output LegacyTurbineOutput `json:"output"`
}
func (OutputV10) Version ¶
func (OutputV10) Version() atc.EventVersion
type OutputV20 ¶
type OutputV20 struct { Plan OutputV20OutputPlan `json:"plan"` CreatedVersion atc.Version `json:"version"` CreatedMetadata []atc.MetadataField `json:"metadata,omitempty"` }
func (OutputV20) Version ¶
func (OutputV20) Version() atc.EventVersion
type OutputV20OutputPlan ¶
type PutPlanV40 ¶
type StartTask ¶
type StartTask struct { Time int64 `json:"time"` Origin Origin `json:"origin"` TaskConfig TaskConfig `json:"config"` }
func (StartTask) Version ¶
func (StartTask) Version() atc.EventVersion
type StartTaskV10 ¶
func (StartTaskV10) EventType ¶
func (StartTaskV10) EventType() atc.EventType
func (StartTaskV10) Version ¶
func (StartTaskV10) Version() atc.EventVersion
type StartTaskV20 ¶
func (StartTaskV20) EventType ¶
func (StartTaskV20) EventType() atc.EventType
func (StartTaskV20) Version ¶
func (StartTaskV20) Version() atc.EventVersion
type StartTaskV30 ¶
func (StartTaskV30) EventType ¶
func (StartTaskV30) EventType() atc.EventType
func (StartTaskV30) Version ¶
func (StartTaskV30) Version() atc.EventVersion
type StartTaskV40 ¶
func (StartTaskV40) EventType ¶
func (StartTaskV40) EventType() atc.EventType
func (StartTaskV40) Version ¶
func (StartTaskV40) Version() atc.EventVersion
type StartV10 ¶
type StartV10 struct {
Time int64 `json:"time"`
}
func (StartV10) Version ¶
func (StartV10) Version() atc.EventVersion
type Status ¶
type Status struct { Status atc.BuildStatus `json:"status"` Time int64 `json:"time"` }
func (Status) Version ¶
func (Status) Version() atc.EventVersion
type TaskConfig ¶
type TaskConfig struct { Platform string `json:"platform"` Image string `json:"image"` Run TaskRunConfig `json:"run"` Inputs []TaskInputConfig `json:"inputs"` }
shadow the real atc.TaskConfig
func ShadowTaskConfig ¶
func ShadowTaskConfig(config atc.TaskConfig) TaskConfig
type TaskInputConfig ¶
type TaskRunConfig ¶
Click to show internal directories.
Click to hide internal directories.