Documentation ¶
Index ¶
- Variables
- func DefaultHTTPClientFactory(cc *cli.Context) (*http.Client, error)
- type ApplicationAttributes
- type ApplicationInfo
- type ApplicationJob
- type Client
- type ClientConfig
- type ExecutionResponse
- type ExecutionStep
- type ExecutionVariable
- type HTTPClientFactory
- type M
- type PipelineConfig
- type PipelineLock
- type PublishTemplateOptions
- type RetrofitErrorResponse
- type Task
- type TaskRefResponse
- type TemplatedPipelineError
- type TemplatedPipelineErrorResponse
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidPipelineTemplate is returned when a plan or run fails due to an // invalid template or configuration. ErrInvalidPipelineTemplate = errors.New("pipeline template is invalid") )
Functions ¶
func DefaultHTTPClientFactory ¶
DefaultHTTPClientFactory creates a basic http.Client that by default can take an x509 cert/key pair for API authentication.
Types ¶
type ApplicationAttributes ¶ added in v0.7.0
ApplicationAttributes application attributes
type ApplicationInfo ¶ added in v0.7.0
type ApplicationInfo struct {
Name string `json:"name"`
}
ApplicationInfo application info
type ApplicationJob ¶ added in v0.10.0
type ApplicationJob struct { Application map[string]interface{} `json:"application"` Type string `json:"type"` }
ApplicationJob create application data
type Client ¶
type Client interface { PublishTemplate(template map[string]interface{}, options PublishTemplateOptions) (*TaskRefResponse, error) ApplicationSubmitTask(app string, task Task) (*TaskRefResponse, error) ApplicationGet(app string) (bool, []byte, error) ApplicationList() ([]ApplicationInfo, error) Plan(configuration map[string]interface{}, template map[string]interface{}) ([]byte, error) DeleteTemplate(templateID string) (*TaskRefResponse, error) ExecPipeline(appName string, pipeline string) (*TaskRefResponse, error) // Run(configuration interface{}) ([]byte, error) GetTask(refURL string) (*ExecutionResponse, error) PollTaskStatus(refURL string, timeout time.Duration) (*ExecutionResponse, error) GetPipelineConfig(app, pipelineConfigID string) (*PipelineConfig, error) SavePipelineConfig(pipelineConfig PipelineConfig) error ListPipelineConfigs(app string) ([]PipelineConfig, error) DeletePipeline(app, pipelineConfigID string) error FiatLogin(fiatUser string, fiatPass string) error }
Client is the Spinnaker API client TODO rz - this interface is pretty bad
type ClientConfig ¶
type ClientConfig struct { HTTPClientFactory HTTPClientFactory Endpoint string }
ClientConfig is used to initialize the Client
type ExecutionResponse ¶
type ExecutionResponse struct { ID string `json:"id"` Name string `json:"string"` Application string `json:"application"` Status string `json:"status"` BuildTime int `json:"buildTime"` StartTime int `json:"startTime"` EndTime int `json:"endTime"` Execution interface{} `json:"execution"` Steps []ExecutionStep `json:"steps"` Variables []ExecutionVariable `json:"variables"` }
ExecutionResponse wraps the generic response format of an orchestration execution.
func (ExecutionResponse) ExtractRetrofitError ¶
func (e ExecutionResponse) ExtractRetrofitError() *RetrofitErrorResponse
ExtractRetrofitError will attempt to find a Retrofit exception and decode it into a RetrofitErrorResponse. This method will fatally error if the decode cannot be performed successfully.
type ExecutionStep ¶
type ExecutionStep struct { ID string `json:"id"` Name string `json:"name"` StartTime int `json:"startTime"` EndTime int `json:"endTime"` Status string `json:"status"` }
ExecutionStep partially represents a single Orca execution step.
type ExecutionVariable ¶
type ExecutionVariable struct { Key string `json:"key"` Value interface{} `json:"value"` }
ExecutionVariable represents a variable key/value pair from an execution.
type HTTPClientFactory ¶
HTTPClientFactory creates a new http.Client from the cli.Context
type M ¶ added in v0.2.0
type M map[string]interface{}
M allows certain responses to contain untyped data (most Spinnaker interfaces)
type PipelineConfig ¶ added in v0.2.0
type PipelineConfig struct { ID string `json:"id,omitempty"` Type string `json:"type,omitempty"` Name string `json:"name"` Application string `json:"application"` Description string `json:"description,omitempty"` ExecutionEngine string `json:"executionEngine,omitempty"` Parallel bool `json:"parallel"` LimitConcurrent bool `json:"limitConcurrent"` KeepWaitingPipelines bool `json:"keepWaitingPipelines"` Stages []map[string]interface{} `json:"stages,omitempty"` Triggers []map[string]interface{} `json:"triggers,omitempty"` ExpectedArtifacts []map[string]interface{} `json:"expectedArtifacts,omitempty"` Parameters []map[string]interface{} `json:"parameterConfig,omitempty"` Notifications []map[string]interface{} `json:"notifications,omitempty"` LastModifiedBy string `json:"lastModifiedBy"` Config interface{} `json:"config,omitempty"` UpdateTs string `json:"updateTs"` }
PipelineConfig represents full pipeline config
type PipelineLock ¶ added in v0.2.0
type PipelineLock struct { AllowUnlockUI bool `json:"allowUnlockUi"` Description string `json:"description"` UI bool `json:"ui"` }
PipelineLock pipeline lock
type PublishTemplateOptions ¶ added in v0.7.0
PublishTemplateOptions options for publishing templates
type RetrofitErrorResponse ¶
type RetrofitErrorResponse struct { Error string `mapstructure:"error"` Errors []string `mapstructure:"errors"` Kind string `mapstructure:"kind"` ResponseBody string `mapstructure:"responseBody"` Status int `mapstructure:"status"` URL string `mapstructure:"url"` }
RetrofitErrorResponse represents a Retrofit error.
type Task ¶ added in v0.7.0
type Task struct { Application string `json:"application"` Description string `json:"description"` Job []interface{} `json:"job,omitempty"` }
Task is a single task
type TaskRefResponse ¶
type TaskRefResponse struct {
Ref string `json:"ref"`
}
TaskRefResponse represents a task ID URL response following a submitted orchestration.
type TemplatedPipelineError ¶
type TemplatedPipelineError struct { Location string `json:"location"` Message string `json:"message"` Suggestion string `json:"suggestion"` Cause string `json:"cause"` Severity string `json:"severity"` Detail map[string]string `json:"detail"` NestedErrors []TemplatedPipelineError `json:"nestedErrors"` }
TemplatedPipelineError represents a single validation error
type TemplatedPipelineErrorResponse ¶
type TemplatedPipelineErrorResponse struct { Errors []TemplatedPipelineError `json:"errors"` Message string `json:"message"` Status string `json:"status"` }
TemplatedPipelineErrorResponse is returned when a pipeline template is invalid