Documentation
¶
Overview ¶
Package tektontypes defines minimal Go types matching the tekton.dev/v1 schema for Task, TaskRun, Pipeline, and PipelineRun. JSON tags align with upstream so `kubectl apply -f` and `tkn-act` parse the same YAML identically.
Scope is intentionally narrow — only fields that the v1 implementation actually reads. Fields we don't support (sidecars, stepActions, retries, resolvers) are not parsed.
Index ¶
- type EnvVar
- type Metadata
- type Object
- type Param
- type ParamSpec
- type ParamType
- type ParamValue
- type Pipeline
- type PipelineRef
- type PipelineResultSpec
- type PipelineRun
- type PipelineRunSpec
- type PipelineRunWSBinding
- type PipelineSpec
- type PipelineTask
- type PipelineWorkspaceDecl
- type ResourceList
- type ResultSpec
- type Step
- type StepResources
- type Task
- type TaskRef
- type TaskRun
- type TaskRunSpec
- type TaskSpec
- type WhenExpression
- type WorkspaceBinding
- type WorkspaceDecl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Object ¶
type Object struct {
APIVersion string `json:"apiVersion"`
Kind string `json:"kind"`
Metadata Metadata `json:"metadata"`
}
Object is the common envelope shared by Task/Pipeline/TaskRun/PipelineRun.
type Param ¶
type Param struct {
Name string `json:"name"`
Value ParamValue `json:"value"`
}
type ParamSpec ¶
type ParamSpec struct {
Name string `json:"name"`
Type ParamType `json:"type,omitempty"` // default string
Description string `json:"description,omitempty"`
Default *ParamValue `json:"default,omitempty"`
}
type ParamValue ¶
type ParamValue struct {
Type ParamType
StringVal string
ArrayVal []string
ObjectVal map[string]string
}
ParamValue can be a string, []string, or map[string]string. Custom JSON unmarshaler picks the right shape from the input.
func (ParamValue) MarshalJSON ¶
func (v ParamValue) MarshalJSON() ([]byte, error)
func (*ParamValue) UnmarshalJSON ¶
func (v *ParamValue) UnmarshalJSON(data []byte) error
type Pipeline ¶
type Pipeline struct {
Object `json:",inline"`
Spec PipelineSpec `json:"spec"`
}
type PipelineRef ¶
type PipelineRef struct {
Name string `json:"name"`
}
type PipelineResultSpec ¶
type PipelineResultSpec struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Value ParamValue `json:"value"`
}
type PipelineRun ¶
type PipelineRun struct {
Object `json:",inline"`
Spec PipelineRunSpec `json:"spec"`
}
type PipelineRunSpec ¶
type PipelineRunSpec struct {
PipelineRef *PipelineRef `json:"pipelineRef,omitempty"`
PipelineSpec *PipelineSpec `json:"pipelineSpec,omitempty"`
Params []Param `json:"params,omitempty"`
Workspaces []PipelineRunWSBinding `json:"workspaces,omitempty"`
}
type PipelineRunWSBinding ¶
type PipelineSpec ¶
type PipelineSpec struct {
Description string `json:"description,omitempty"`
Params []ParamSpec `json:"params,omitempty"`
Workspaces []PipelineWorkspaceDecl `json:"workspaces,omitempty"`
Tasks []PipelineTask `json:"tasks"`
Finally []PipelineTask `json:"finally,omitempty"`
Results []PipelineResultSpec `json:"results,omitempty"`
}
type PipelineTask ¶
type PipelineTask struct {
Name string `json:"name"`
TaskRef *TaskRef `json:"taskRef,omitempty"`
TaskSpec *TaskSpec `json:"taskSpec,omitempty"` // inline task
Params []Param `json:"params,omitempty"`
Workspaces []WorkspaceBinding `json:"workspaces,omitempty"`
RunAfter []string `json:"runAfter,omitempty"`
When []WhenExpression `json:"when,omitempty"`
}
type PipelineWorkspaceDecl ¶
type ResourceList ¶
type ResultSpec ¶
type Step ¶
type Step struct {
Name string `json:"name"`
Image string `json:"image"`
Command []string `json:"command,omitempty"`
Args []string `json:"args,omitempty"`
Script string `json:"script,omitempty"`
Env []EnvVar `json:"env,omitempty"`
WorkingDir string `json:"workingDir,omitempty"`
Resources *StepResources `json:"resources,omitempty"`
ImagePullPolicy string `json:"imagePullPolicy,omitempty"` // Always | IfNotPresent | Never
}
type StepResources ¶
type StepResources struct {
Limits ResourceList `json:"limits,omitempty"`
Requests ResourceList `json:"requests,omitempty"`
}
type TaskRun ¶
type TaskRun struct {
Object `json:",inline"`
Spec TaskRunSpec `json:"spec"`
}
type TaskRunSpec ¶
type TaskRunSpec struct {
TaskRef *TaskRef `json:"taskRef,omitempty"`
TaskSpec *TaskSpec `json:"taskSpec,omitempty"`
Params []Param `json:"params,omitempty"`
Workspaces []WorkspaceBinding `json:"workspaces,omitempty"`
}
type TaskSpec ¶
type TaskSpec struct {
Params []ParamSpec `json:"params,omitempty"`
Results []ResultSpec `json:"results,omitempty"`
Workspaces []WorkspaceDecl `json:"workspaces,omitempty"`
Steps []Step `json:"steps"`
Description string `json:"description,omitempty"`
}
type WhenExpression ¶
type WorkspaceBinding ¶
Click to show internal directories.
Click to hide internal directories.