Documentation ¶
Index ¶
- Constants
- Variables
- type Application
- type ApplicationAttributes
- type ApplicationService
- func (service *ApplicationService) CreateApplication(app *Application) error
- func (service *ApplicationService) DeleteApplication(app *Application) error
- func (service *ApplicationService) GetApplicationByName(name string) (*Application, error)
- func (service *ApplicationService) GetApplicationByNameWithRetries(name string) (*Application, error)
- func (service *ApplicationService) GetApplications() (*[]*Application, error)
- func (service *ApplicationService) UpdateApplication(app *Application) error
- type Auth
- type AwsProviderSettings
- type BakeStage
- type CanaryAnalysisConfig
- type CanaryAnalysisConfigScope
- type CanaryAnalysisConfigScoreThreadholds
- type CanaryAnalysisStage
- type CanaryConfig
- type CanaryConfigClassifier
- type CanaryConfigJudge
- type CanaryConfigMetric
- type CanaryConfigMetricQuery
- type CanaryConfigService
- func (service *CanaryConfigService) CreateCanaryConfig(config *CanaryConfig) (configId string, err error)
- func (service *CanaryConfigService) DeleteCanaryConfig(configId string) error
- func (service *CanaryConfigService) GetCanaryConfig(id string) (*CanaryConfig, error)
- func (service *CanaryConfigService) GetCanaryConfigs() (*[]*CanaryConfig, error)
- func (service *CanaryConfigService) UpdateCanaryConfig(config *CanaryConfig) error
- type Capacity
- type Client
- func (client *Client) Do(req *http.Request) (*http.Response, error)
- func (client *Client) DoWithResponse(req *http.Request, v interface{}) (*http.Response, error)
- func (client *Client) DoWithRetry(retryOnStatus int, maxAttempts int, createReq func() (*http.Request, error)) (*http.Response, error)
- func (client *Client) NewRequest(method string, path string) (*http.Request, error)
- func (client *Client) NewRequestWithBody(method string, path string, data interface{}) (*http.Request, error)
- type Config
- type CreateCanaryConfigResponse
- type CreatePipelineRequest
- type DataSources
- type DeleteManifestMode
- type DeleteManifestOptions
- type DeleteManifestStage
- type DeployManifestSource
- type DeployManifestStage
- type DeployManifests
- type DeployStage
- type DeployStageCluster
- type DestroyServerGroupStage
- type FindImageFromTagsStage
- type JenkinsStage
- type Job
- type JudgmentInputs
- type ManualJudgmentStage
- type Message
- type MessageText
- type Moniker
- type Notification
- type NotificationLevel
- type Pipeline
- func (pipeline *Pipeline) AppendNotification(notification *Notification)
- func (p *Pipeline) AppendParameter(parameter *PipelineParameter)
- func (pipeline *Pipeline) AppendStage(stage Stage)
- func (pipeline *Pipeline) AppendTrigger(trigger *Trigger)
- func (pipeline *Pipeline) DeleteNotification(notificationID string) error
- func (p *Pipeline) DeleteParameter(parameterID string) error
- func (pipeline *Pipeline) DeleteStage(stageID string) error
- func (p *Pipeline) DeleteTrigger(triggerID string) error
- func (pipeline *Pipeline) GetNotification(notificationID string) (*Notification, error)
- func (p *Pipeline) GetParameter(parameterID string) (*PipelineParameter, error)
- func (pipeline *Pipeline) GetStage(stageID string) (Stage, error)
- func (p *Pipeline) GetTrigger(triggerID string) (*Trigger, error)
- func (pipeline *Pipeline) UpdateNotification(notification *Notification) error
- func (p *Pipeline) UpdateParameter(parameter *PipelineParameter) error
- func (pipeline *Pipeline) UpdateStage(stage Stage) error
- func (p *Pipeline) UpdateTrigger(trigger *Trigger) error
- type PipelineMessage
- func (m *PipelineMessage) CompleteText() string
- func (m *PipelineMessage) FailedText() string
- func (m *PipelineMessage) SetCompleteText(text string)
- func (m *PipelineMessage) SetFailedText(text string)
- func (m *PipelineMessage) SetStartingText(text string)
- func (m *PipelineMessage) StartingText() string
- type PipelineParameter
- type PipelineParameterOption
- type PipelineService
- func (service *PipelineService) CreatePipeline(pipeline *CreatePipelineRequest) error
- func (service *PipelineService) DeletePipeline(pipeline *Pipeline) error
- func (service *PipelineService) GetApplicationPipelines(applicationName string) (*[]*Pipeline, error)
- func (service *PipelineService) GetPipeline(applicationName string, pipelineName string) (*Pipeline, error)
- func (service *PipelineService) GetPipelineByID(id string) (*Pipeline, error)
- func (service *PipelineService) UpdatePipeline(pipeline *Pipeline) error
- type PipelineStage
- type ProviderSettings
- type Relationships
- type ResizeServerGroupStage
- type Rollback
- type RollbackClusterStage
- type SerializableNotification
- type SerializablePipeline
- type SpinnakerError
- type Stage
- type StageEnabled
- type StageExecutionWindow
- type StageExecutionWindowJitter
- type StageExecutionWindowWhitelist
- type StageMessage
- type StageType
- type Task
- type TaskExecution
- type TaskResponse
- type TrafficManagement
- type TrafficManagementOptions
- type Trigger
- type WebhookStage
Constants ¶
const PipelineCompleteKey = "pipeline.complete"
PipelineCompleteKey for pipeline complete
const PipelineFailedKey = "pipeline.failed"
PipelineFailedKey for pipeline failed
const PipelineStartingKey = "pipeline.starting"
PipelineStartingKey for pipeline starting
const StageCompleteKey = "stage.complete"
StageCompleteKey for stage complete
const StageFailedKey = "stage.failed"
StageFailedKey for stage failed
const StageStartingKey = "stage.starting"
StageStartingKey for pipeline starting
Variables ¶
var ErrCanaryConfigNotFound = errors.New("Could not find canary config")
var ErrInvalidApplicationName = errors.New("Invalid application name")
ErrInvalidApplicationName invalid application name
var ErrInvalidDecodeResponseParameter = errors.New("nil interface provided to decodeResponse")
ErrInvalidDecodeResponseParameter invalid parameter for decodeResponse
var ErrInvalidNotificatoinLevel = errors.New("Invalid notification level")
ErrInvalidNotificatoinLevel invalid notification level
var ErrParameterNotFound = errors.New("could not find parameter")
ErrParameterNotFound parameter not found
var ErrPipelineNotFound = errors.New("Could not find pipeline")
ErrPipelineNotFound pipeline not found
var ErrPipelineNotificationNotFound = errors.New("notification not found")
ErrPipelineNotificationNotFound notification not found
var ErrStageNotFound = errors.New("Could not find stage")
ErrStageNotFound stage not found
var ErrTriggerNotFound = errors.New("could not find trigger")
ErrTriggerNotFound trigger not found
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct { Accounts string `json:"accounts"` CloudProviders string `json:"cloudProviders"` CreateTs string `json:"createTs"` DataSources *DataSources `json:"dataSources"` DesiredCount string `json:"desiredCount"` Email string `json:"email"` EnableRestartRunningExecutions bool `json:"enableRestartRunningExecutions"` IamRole string `json:"iamRole"` InstancePort int `json:"instancePort"` LastModifiedBy string `json:"lastModifiedBy"` Name string `json:"name"` PlatformHealthOnly bool `json:"platformHealthOnly"` PlatformHealthOnlyShowOverride bool `json:"platformHealthOnlyShowOverride"` ProviderSettings *ProviderSettings `json:"providerSettings"` RepoProjectKey string `json:"repoProjectKey"` RepoSlug string `json:"repoSlug"` RepoType string `json:"repoType"` TaskDefinition string `json:"taskDefinition"` TrafficGuards []string `json:"trafficGuards"` UpdateTs string `json:"updateTs"` User string `json:"user"` }
Application Settings for Application
func NewApplication ¶
func NewApplication() *Application
NewApplication return Application object with default values
type ApplicationAttributes ¶ added in v1.3.0
type ApplicationAttributes struct {
Application *Application `json:"attributes"`
}
ApplicationAttributes mapping for `application/{appName}` endpoint
type ApplicationService ¶
type ApplicationService struct {
*Client
}
ApplicationService for interacting with spinnaker applications
func (*ApplicationService) CreateApplication ¶
func (service *ApplicationService) CreateApplication(app *Application) error
CreateApplication create an application
func (*ApplicationService) DeleteApplication ¶
func (service *ApplicationService) DeleteApplication(app *Application) error
DeleteApplication delete an application
func (*ApplicationService) GetApplicationByName ¶ added in v1.3.0
func (service *ApplicationService) GetApplicationByName(name string) (*Application, error)
GetApplicationByName return the application given a name
func (*ApplicationService) GetApplicationByNameWithRetries ¶ added in v1.3.0
func (service *ApplicationService) GetApplicationByNameWithRetries(name string) (*Application, error)
GetApplicationByNameWithRetries return the application given a name and retries
func (*ApplicationService) GetApplications ¶
func (service *ApplicationService) GetApplications() (*[]*Application, error)
GetApplications get all applications
func (*ApplicationService) UpdateApplication ¶ added in v1.3.0
func (service *ApplicationService) UpdateApplication(app *Application) error
UpdateApplication update an application
type AwsProviderSettings ¶
type AwsProviderSettings struct {
UseAmiBlockDeviceMappings bool `json:"useAmiBlockDeviceMappings"`
}
AwsProviderSettings Settings for AWS Provider
func NewAwsProviderSettings ¶
func NewAwsProviderSettings() *AwsProviderSettings
NewAwsProviderSettings return Aws provider settings with default values
type BakeStage ¶
type BakeStage struct { Notifications *[]*Notification `json:"notifications"` // contains filtered or unexported fields }
BakeStage for pipeline
type CanaryAnalysisConfig ¶ added in v1.5.0
type CanaryAnalysisConfig struct { CanaryAnalysisIntervalMins string `json:"canaryAnalysisIntervalMins"` CanaryConfigId string `json:"canaryConfigId"` LifetimeDuration string `json:"lifetimeDuration"` MetricsAccountName string `json:"metricsAccountName"` Scopes []*CanaryAnalysisConfigScope `json:"scopes"` ScoreThresholds CanaryAnalysisConfigScoreThreadholds `json:"scoreThresholds"` StorageAccountName string `json:"storageAccountName"` }
func NewCanaryAnalysisConfig ¶ added in v1.5.0
func NewCanaryAnalysisConfig() *CanaryAnalysisConfig
type CanaryAnalysisConfigScope ¶ added in v1.5.0
type CanaryAnalysisConfigScope struct { ControlLocation string `json:"controlLocation,omitempty"` ControlScope string `json:"controlScope,omitempty"` ExperimentLocation string `json:"experimentLocation,omitempty"` ExperimentScope string `json:"experimentScope,omitempty"` ExtendedScopeParams map[string]string `json:"extendedScopeParams"` ScopeName string `json:"scopeName"` Step int `json:"step"` }
type CanaryAnalysisConfigScoreThreadholds ¶ added in v1.5.0
type CanaryAnalysisStage ¶ added in v1.5.0
type CanaryAnalysisStage struct { // BaseStage Name string `json:"name"` RefID string `json:"refId"` Type StageType `json:"type"` RequisiteStageRefIds []string `json:"requisiteStageRefIds"` SendNotifications bool `json:"sendNotifications"` StageEnabled *StageEnabled `json:"stageEnabled"` CompleteOtherBranchesThenFail bool `json:"completeOtherBranchesThenFail"` ContinuePipeline bool `json:"continuePipeline"` FailOnFailedExpressions bool `json:"failOnFailedExpressions"` FailPipeline bool `json:"failPipeline"` OverrideTimeout bool `json:"overrideTimeout"` RestrictExecutionDuringTimeWindow bool `json:"restrictExecutionDuringTimeWindow"` RestrictedExecutionWindow *StageExecutionWindow `json:"restrictedExecutionWindow"` Notifications *[]*Notification `json:"notifications"` AnalysisType string `json:"analysisType"` CanaryConfig *CanaryAnalysisConfig `json:"canaryConfig"` Deployments *[]*DeployStageCluster `json:"deployments,omitempty"` }
func NewCanaryAnalysisStage ¶ added in v1.5.0
func NewCanaryAnalysisStage() *CanaryAnalysisStage
func (*CanaryAnalysisStage) GetName ¶ added in v1.5.0
func (s *CanaryAnalysisStage) GetName() string
GetName for Stage interface
func (*CanaryAnalysisStage) GetRefID ¶ added in v1.5.0
func (s *CanaryAnalysisStage) GetRefID() string
GetRefID for Stage interface
func (*CanaryAnalysisStage) GetType ¶ added in v1.5.0
func (s *CanaryAnalysisStage) GetType() StageType
GetType for Stage interface
type CanaryConfig ¶ added in v1.5.0
type CanaryConfig struct { Id string `json:"id,omitempty"` Name string `json:"name"` Applications []string `json:"applications"` Description string `json:"description"` Metrics []*CanaryConfigMetric `json:"metrics"` ConfigVersion string `json:"configVersion"` Templates map[string]interface{} `json:"templates"` Classifier *CanaryConfigClassifier `json:"classifier"` Judge *CanaryConfigJudge `json:"judge"` }
func NewCanaryConfig ¶ added in v1.5.0
func NewCanaryConfig(judge *CanaryConfigJudge, name string, application string) *CanaryConfig
func (*CanaryConfig) AddGroup ¶ added in v1.5.0
func (config *CanaryConfig) AddGroup(group string, weight float64)
func (*CanaryConfig) AddMetric ¶ added in v1.5.0
func (config *CanaryConfig) AddMetric(metric *CanaryConfigMetric)
type CanaryConfigClassifier ¶ added in v1.5.0
func NewCanaryConfigClassifier ¶ added in v1.5.0
func NewCanaryConfigClassifier() *CanaryConfigClassifier
type CanaryConfigJudge ¶ added in v1.5.0
type CanaryConfigJudge struct { Name string `json:"name"` JudgeConfigurations map[string]interface{} `json:"judgeConfigurations"` }
func NewCanaryConfigJudge ¶ added in v1.5.0
func NewCanaryConfigJudge(name string) *CanaryConfigJudge
type CanaryConfigMetric ¶ added in v1.5.0
type CanaryConfigMetric struct { // AnalysisConfigurations interface `json:"analysisConfigurations"` Name string `json:"name"` Query *CanaryConfigMetricQuery `json:"query"` Groups []string `json:"groups"` ScopeName string `json:"scopeName"` }
func NewCanaryConfigMetric ¶ added in v1.5.0
func NewCanaryConfigMetric( group string, name string, metricQuery *CanaryConfigMetricQuery, ) *CanaryConfigMetric
type CanaryConfigMetricQuery ¶ added in v1.5.0
type CanaryConfigMetricQuery struct { Type string `json:"type"` ServiceType string `json:"serviceType"` MetricName string `json:"metricName"` }
func NewCanaryConfigMetricQuery ¶ added in v1.5.0
func NewCanaryConfigMetricQuery(metric string, serviceType string, metricType string) *CanaryConfigMetricQuery
type CanaryConfigService ¶ added in v1.5.0
type CanaryConfigService struct {
*Client
}
func (*CanaryConfigService) CreateCanaryConfig ¶ added in v1.5.0
func (service *CanaryConfigService) CreateCanaryConfig(config *CanaryConfig) (configId string, err error)
CreateApplication create an application
func (*CanaryConfigService) DeleteCanaryConfig ¶ added in v1.5.0
func (service *CanaryConfigService) DeleteCanaryConfig(configId string) error
func (*CanaryConfigService) GetCanaryConfig ¶ added in v1.5.0
func (service *CanaryConfigService) GetCanaryConfig(id string) (*CanaryConfig, error)
func (*CanaryConfigService) GetCanaryConfigs ¶ added in v1.5.0
func (service *CanaryConfigService) GetCanaryConfigs() (*[]*CanaryConfig, error)
func (*CanaryConfigService) UpdateCanaryConfig ¶ added in v1.5.0
func (service *CanaryConfigService) UpdateCanaryConfig(config *CanaryConfig) error
type Capacity ¶
type Capacity struct { Desired string `json:"desired"` Max string `json:"max"` Min string `json:"min"` }
Capacity capacity for cluster
type Client ¶
type Client struct { Config *Config // contains filtered or unexported fields }
Client to talk to Spinnaker
func (*Client) DoWithResponse ¶
DoWithResponse send http request and parse response body
func (*Client) DoWithRetry ¶
func (client *Client) DoWithRetry(retryOnStatus int, maxAttempts int, createReq func() (*http.Request, error)) (*http.Response, error)
DoWithRetry send http request with retry
func (*Client) NewRequest ¶
NewRequest create http request
type CreateCanaryConfigResponse ¶ added in v1.5.0
type CreateCanaryConfigResponse struct {
CanaryConfigId string `json:"canaryConfigId"`
}
type CreatePipelineRequest ¶
type CreatePipelineRequest struct { Application string `json:"application"` Name string `json:"name"` }
CreatePipelineRequest used to create pipeline
type DataSources ¶ added in v1.3.0
type DeleteManifestMode ¶ added in v1.2.0
type DeleteManifestMode int
const ( DeleteManifestModeUnknown DeleteManifestMode = iota DeleteManifestModeStatic )
func ParseDeleteManifestMode ¶ added in v1.2.0
func ParseDeleteManifestMode(s string) (DeleteManifestMode, error)
func (DeleteManifestMode) MarshalText ¶ added in v1.2.0
func (m DeleteManifestMode) MarshalText() ([]byte, error)
func (DeleteManifestMode) String ¶ added in v1.2.0
func (t DeleteManifestMode) String() string
func (*DeleteManifestMode) UnmarshalText ¶ added in v1.2.0
func (m *DeleteManifestMode) UnmarshalText(text []byte) error
type DeleteManifestOptions ¶ added in v1.2.0
type DeleteManifestOptions struct {
Cascading bool `json:"cascading"`
}
func NewDeleteManifestOptions ¶ added in v1.2.0
func NewDeleteManifestOptions() *DeleteManifestOptions
type DeleteManifestStage ¶ added in v1.2.0
type DeleteManifestStage struct { // BaseStage Name string `json:"name"` RefID string `json:"refId"` Type StageType `json:"type"` RequisiteStageRefIds []string `json:"requisiteStageRefIds"` SendNotifications bool `json:"sendNotifications"` StageEnabled *StageEnabled `json:"stageEnabled"` CompleteOtherBranchesThenFail bool `json:"completeOtherBranchesThenFail"` ContinuePipeline bool `json:"continuePipeline"` FailOnFailedExpressions bool `json:"failOnFailedExpressions"` FailPipeline bool `json:"failPipeline"` OverrideTimeout bool `json:"overrideTimeout"` RestrictExecutionDuringTimeWindow bool `json:"restrictExecutionDuringTimeWindow"` RestrictedExecutionWindow *StageExecutionWindow `json:"restrictedExecutionWindow"` Notifications *[]*Notification `json:"notifications"` Account string `json:"account"` App string `json:"app"` CloudProvider string `json:"cloudProvider"` Location string `json:"location"` ManifestName string `json:"manifestName"` Mode DeleteManifestMode `json:"mode"` Options *DeleteManifestOptions `json:"options"` }
func NewDeleteManifestStage ¶ added in v1.2.0
func NewDeleteManifestStage() *DeleteManifestStage
func (*DeleteManifestStage) GetName ¶ added in v1.2.0
func (s *DeleteManifestStage) GetName() string
GetName for Stage interface
func (*DeleteManifestStage) GetRefID ¶ added in v1.2.0
func (s *DeleteManifestStage) GetRefID() string
GetRefID for Stage interface
func (*DeleteManifestStage) GetType ¶ added in v1.2.0
func (s *DeleteManifestStage) GetType() StageType
GetType for Stage interface
type DeployManifestSource ¶ added in v1.2.0
type DeployManifestSource int
const ( DeployManifestSourceUnknown DeployManifestSource = iota DeployManifestSourceText )
func ParseDeployManifestSource ¶ added in v1.2.0
func ParseDeployManifestSource(s string) (DeployManifestSource, error)
func (DeployManifestSource) MarshalText ¶ added in v1.2.0
func (t DeployManifestSource) MarshalText() ([]byte, error)
func (DeployManifestSource) String ¶ added in v1.2.0
func (t DeployManifestSource) String() string
func (*DeployManifestSource) UnmarshalText ¶ added in v1.2.0
func (t *DeployManifestSource) UnmarshalText(text []byte) error
type DeployManifestStage ¶ added in v1.2.0
type DeployManifestStage struct { // BaseStage Name string `json:"name"` RefID string `json:"refId"` Type StageType `json:"type"` RequisiteStageRefIds []string `json:"requisiteStageRefIds"` SendNotifications bool `json:"sendNotifications"` StageEnabled *StageEnabled `json:"stageEnabled"` CompleteOtherBranchesThenFail bool `json:"completeOtherBranchesThenFail"` ContinuePipeline bool `json:"continuePipeline"` FailOnFailedExpressions bool `json:"failOnFailedExpressions"` FailPipeline bool `json:"failPipeline"` OverrideTimeout bool `json:"overrideTimeout"` RestrictExecutionDuringTimeWindow bool `json:"restrictExecutionDuringTimeWindow"` RestrictedExecutionWindow *StageExecutionWindow `json:"restrictedExecutionWindow"` Notifications *[]*Notification `json:"notifications"` Account string `json:"account"` CloudProvider string `json:"cloudProvider"` ManifestArtifactAccount string `json:"manifestArtifactAccount"` Manifests *DeployManifests `json:"manifests"` Moniker *Moniker `json:"moniker"` Relationships *Relationships `json:"relationships"` SkipExpressionEvaluation bool `json:"skipExpressionEvaluation"` Source DeployManifestSource `json:"source"` TrafficManagement *TrafficManagement `json:"trafficManagement"` }
func NewDeployManifestStage ¶ added in v1.2.0
func NewDeployManifestStage() *DeployManifestStage
func (*DeployManifestStage) GetName ¶ added in v1.2.0
func (s *DeployManifestStage) GetName() string
GetName for Stage interface
func (*DeployManifestStage) GetRefID ¶ added in v1.2.0
func (s *DeployManifestStage) GetRefID() string
GetRefID for Stage interface
func (*DeployManifestStage) GetType ¶ added in v1.2.0
func (s *DeployManifestStage) GetType() StageType
GetType for Stage interface
type DeployManifests ¶ added in v1.2.0
type DeployManifests []string
func NewDeployManifests ¶ added in v1.2.0
func NewDeployManifests() *DeployManifests
func ParseDeployManifests ¶ added in v1.2.0
func ParseDeployManifests(manifestInterface []interface{}) (*DeployManifests, error)
func (DeployManifests) MarshalJSON ¶ added in v1.2.0
func (s DeployManifests) MarshalJSON() ([]byte, error)
type DeployStage ¶
type DeployStage struct { Notifications *[]*Notification `json:"notifications"` // contains filtered or unexported fields }
DeployStage for pipeline
type DeployStageCluster ¶
type DeployStageCluster struct { Account string `json:"account"` Application string `json:"application"` AvailabilityZones map[string][]string `json:"availabilityZones"` Capacity *Capacity `json:"capacity"` CloudProvider string `json:"cloudProvider"` Cooldown int `json:"cooldown"` CopySourceCustomBlockDeviceMappings bool `json:"copySourceCustomBlockDeviceMappings"` DelayBeforeDisableSec int `json:"delayBeforeDisableSec"` DelayBeforeScaleDownSec int `json:"delayBeforeScaleDownSec"` Dirty map[string]interface{} `json:"dirty"` EBSOptimized bool `json:"ebsOptimized"` EnabledMetrics []string `json:"enabledMetrics"` FreeFormDetails string `json:"freeFormDetails"` HealthCheckGracePeriod string `json:"healthCheckGracePeriod"` HealthCheckType string `json:"healthCheckType"` IAMRole string `json:"iamRole"` InstanceMonitoring bool `json:"instanceMonitoring"` InstanceType string `json:"instanceType"` KeyPair string `json:"keyPair"` LoadBalancers []string `json:"loadBalancers"` MaxRemainingAsgs int `json:"maxRemainingAsgs"` Moniker *Moniker `json:"moniker"` Provider string `json:"provider"` Rollback *Rollback `json:"rollback"` ScaleDown bool `json:"scaleDown"` SecurityGroups interface{} `json:"securityGroups"` SpelLoadBalancers []string `json:"spelLoadBalancers"` SpelTargetGroups []string `json:"spelTargetGroups"` SpotPrice string `json:"spotPrice"` Stack string `json:"stack"` Strategy string `json:"strategy"` SubnetType string `json:"subnetType"` SuspendedProcesses []string `json:"suspendedProcesses"` Tags map[string]string `json:"tags"` TargetGroups []string `json:"targetGroups"` TargetHealthyDeployPercentage int `json:"targetHealthyDeployPercentage"` TerminationPolicies []string `json:"terminationPolicies"` UseAmiBlockDeviceMappings bool `json:"useAmiBlockDeviceMappings"` UseSourceCapacity bool `json:"useSourceCapacity"` UserData string `json:"base64UserData"` }
TODO rename to more generic DeployStageCluster cluster to deploy
func NewDeployStageCluster ¶
func NewDeployStageCluster() *DeployStageCluster
type DestroyServerGroupStage ¶
type DestroyServerGroupStage struct { Notifications *[]*Notification `json:"notifications"` // contains filtered or unexported fields }
DestroyServerGroupStage for pipeline
func NewDestroyServerGroupStage ¶
func NewDestroyServerGroupStage() *DestroyServerGroupStage
NewDestroyServerGroupStage for pipeline
func (*DestroyServerGroupStage) GetName ¶
func (s *DestroyServerGroupStage) GetName() string
GetName for Stage interface
func (*DestroyServerGroupStage) GetRefID ¶
func (s *DestroyServerGroupStage) GetRefID() string
GetRefID for Stage interface
func (*DestroyServerGroupStage) GetType ¶
func (s *DestroyServerGroupStage) GetType() StageType
GetType for Stage interface
type FindImageFromTagsStage ¶ added in v1.3.0
type FindImageFromTagsStage struct { Notifications *[]*Notification `json:"notifications"` // contains filtered or unexported fields }
FindImageFromTagsStage for pipeline
func NewFindImageStage ¶ added in v1.3.0
func NewFindImageStage() *FindImageFromTagsStage
NewFindImageStage for pipeline
func (*FindImageFromTagsStage) GetName ¶ added in v1.3.0
func (s *FindImageFromTagsStage) GetName() string
GetName for Stage interface
func (*FindImageFromTagsStage) GetRefID ¶ added in v1.3.0
func (s *FindImageFromTagsStage) GetRefID() string
GetRefID for Stage interface
func (*FindImageFromTagsStage) GetType ¶ added in v1.3.0
func (s *FindImageFromTagsStage) GetType() StageType
GetType for Stage interface
type JenkinsStage ¶
type JenkinsStage struct { Notifications *[]*Notification `json:"notifications"` // contains filtered or unexported fields }
JenkinsStage for pipeline
func (*JenkinsStage) GetRefID ¶
func (s *JenkinsStage) GetRefID() string
GetRefID for Stage interface
func (*JenkinsStage) GetType ¶
func (s *JenkinsStage) GetType() StageType
GetType for Stage interface
type Job ¶
type Job struct { Type string `json:"type"` Application *Application `json:"application"` User string `json:"user"` }
Job a job to run
type JudgmentInputs ¶ added in v1.3.0
type JudgmentInputs struct {
Value string `json:"value"`
}
JudgmentInputs inputs for judgment
type ManualJudgmentStage ¶ added in v1.3.0
type ManualJudgmentStage struct { Notifications *[]*Notification `json:"notifications"` // contains filtered or unexported fields }
ManualJudgmentStage for pipeline
func NewManualJudgmentStage ¶ added in v1.3.0
func NewManualJudgmentStage() *ManualJudgmentStage
NewManualJudgmentStage for pipeline
func (*ManualJudgmentStage) GetName ¶ added in v1.3.0
func (s *ManualJudgmentStage) GetName() string
GetName for Stage interface
func (*ManualJudgmentStage) GetRefID ¶ added in v1.3.0
func (s *ManualJudgmentStage) GetRefID() string
GetRefID for Stage interface
func (*ManualJudgmentStage) GetType ¶ added in v1.3.0
func (s *ManualJudgmentStage) GetType() StageType
GetType for Stage interface
type Message ¶
type Message interface { SetCompleteText(string) CompleteText() string SetFailedText(string) FailedText() string SetStartingText(string) StartingText() string }
Message for Notification
type MessageText ¶
type MessageText struct {
Text string `json:"text"`
}
MessageText for Pipeline Notification
type Moniker ¶
type Moniker struct { App string `json:"app,omitempty"` Cluster string `json:"cluster,omitempty"` Detail string `json:"detail,omitempty"` Stack string `json:"stack,omitempty"` Sequence string `json:"sequence,omitempty"` }
Moniker for cluster
type Notification ¶
type Notification struct { SerializableNotification Message Message `json:"message"` }
Notification for pipeline
type NotificationLevel ¶
type NotificationLevel string
NotificationLevel level of notification
const NotificationLevelPipeline NotificationLevel = "pipeline"
NotificationLevelPipeline pipeline level notifaction
const NotificationLevelStage NotificationLevel = "stage"
NotificationLevelStage stage level notifaction
type Pipeline ¶
type Pipeline struct { SerializablePipeline Notifications *[]*Notification `json:"notifications"` Stages *[]Stage `json:"stages"` }
Pipeline deploy pipeline in application
func (*Pipeline) AppendNotification ¶
func (pipeline *Pipeline) AppendNotification(notification *Notification)
AppendNotification append notification
func (*Pipeline) AppendParameter ¶
func (p *Pipeline) AppendParameter(parameter *PipelineParameter)
AppendParameter append parameter
func (*Pipeline) AppendStage ¶
AppendStage append stage
func (*Pipeline) AppendTrigger ¶
AppendTrigger append trigger
func (*Pipeline) DeleteNotification ¶
DeleteNotification delete notification
func (*Pipeline) DeleteParameter ¶
DeleteParameter in pipeline
func (*Pipeline) DeleteStage ¶
DeleteStage delete stage
func (*Pipeline) DeleteTrigger ¶
DeleteTrigger in pipeline
func (*Pipeline) GetNotification ¶
func (pipeline *Pipeline) GetNotification(notificationID string) (*Notification, error)
GetNotification Get notification by id
func (*Pipeline) GetParameter ¶
func (p *Pipeline) GetParameter(parameterID string) (*PipelineParameter, error)
GetParameter by ID
func (*Pipeline) GetTrigger ¶
GetTrigger by ID
func (*Pipeline) UpdateNotification ¶
func (pipeline *Pipeline) UpdateNotification(notification *Notification) error
UpdateNotification update notification
func (*Pipeline) UpdateParameter ¶
func (p *Pipeline) UpdateParameter(parameter *PipelineParameter) error
UpdateParameter in pipeline
func (*Pipeline) UpdateStage ¶
UpdateStage update stage
func (*Pipeline) UpdateTrigger ¶
UpdateTrigger in pipeline
type PipelineMessage ¶
type PipelineMessage struct { Complete *MessageText `json:"pipeline.complete" mapstructure:"pipeline.complete"` Failed *MessageText `json:"pipeline.failed" mapstructure:"pipeline.failed"` Starting *MessageText `json:"pipeline.starting" mapstructure:"pipeline.starting"` }
PipelineMessage for Pipeline Notification
func (*PipelineMessage) CompleteText ¶
func (m *PipelineMessage) CompleteText() string
CompleteText for Message interface
func (*PipelineMessage) FailedText ¶
func (m *PipelineMessage) FailedText() string
FailedText for Message interface
func (*PipelineMessage) SetCompleteText ¶
func (m *PipelineMessage) SetCompleteText(text string)
SetCompleteText for Message interface
func (*PipelineMessage) SetFailedText ¶
func (m *PipelineMessage) SetFailedText(text string)
SetFailedText for Message interface
func (*PipelineMessage) SetStartingText ¶
func (m *PipelineMessage) SetStartingText(text string)
SetStartingText for Message interface
func (*PipelineMessage) StartingText ¶
func (m *PipelineMessage) StartingText() string
StartingText for Message interface
type PipelineParameter ¶
type PipelineParameter struct { ID string `json:"id"` Default string `json:"default"` Description string `json:"description"` HasOptions bool `json:"hasOptions"` Label string `json:"label"` Name string `json:"name"` Options *[]*PipelineParameterOption `json:"options"` Required bool `json:"required"` }
type PipelineParameterOption ¶
type PipelineParameterOption struct {
Value string `json:"value"`
}
type PipelineService ¶
type PipelineService struct {
*Client
}
PipelineService used to manage pipelines
func (*PipelineService) CreatePipeline ¶
func (service *PipelineService) CreatePipeline(pipeline *CreatePipelineRequest) error
CreatePipeline in application
func (*PipelineService) DeletePipeline ¶
func (service *PipelineService) DeletePipeline(pipeline *Pipeline) error
DeletePipeline in application
func (*PipelineService) GetApplicationPipelines ¶
func (service *PipelineService) GetApplicationPipelines(applicationName string) (*[]*Pipeline, error)
GetApplicationPipelines get all pipelines for an application
func (*PipelineService) GetPipeline ¶
func (service *PipelineService) GetPipeline(applicationName string, pipelineName string) (*Pipeline, error)
GetPipeline get pipeline by name and application
func (*PipelineService) GetPipelineByID ¶
func (service *PipelineService) GetPipelineByID(id string) (*Pipeline, error)
GetPipelineByID get pipeline by id
func (*PipelineService) UpdatePipeline ¶
func (service *PipelineService) UpdatePipeline(pipeline *Pipeline) error
UpdatePipeline in application
type PipelineStage ¶
type PipelineStage struct { Notifications *[]*Notification `json:"notifications"` // contains filtered or unexported fields }
PipelineStage for pipeline
func (*PipelineStage) GetName ¶
func (s *PipelineStage) GetName() string
GetName for Stage interface
func (*PipelineStage) GetRefID ¶
func (s *PipelineStage) GetRefID() string
GetRefID for Stage interface
func (*PipelineStage) GetType ¶
func (s *PipelineStage) GetType() StageType
GetType for Stage interface
type ProviderSettings ¶
type ProviderSettings struct {
AWS *AwsProviderSettings `json:"aws"`
}
ProviderSettings Settings for Provider
type Relationships ¶ added in v1.2.0
type Relationships struct { LoadBalancers *[]string `json:"loadBalancers"` SecurityGroups *[]string `json:"securityGroups"` }
func NewRelationships ¶ added in v1.2.0
func NewRelationships() *Relationships
type ResizeServerGroupStage ¶
type ResizeServerGroupStage struct { Notifications *[]*Notification `json:"notifications"` // contains filtered or unexported fields }
ResizeServerGroupStage for pipeline
func NewResizeServerGroupStage ¶
func NewResizeServerGroupStage() *ResizeServerGroupStage
NewResizeServerGroupStage for pipeline
func (*ResizeServerGroupStage) GetName ¶
func (s *ResizeServerGroupStage) GetName() string
GetName for Stage interface
func (*ResizeServerGroupStage) GetRefID ¶
func (s *ResizeServerGroupStage) GetRefID() string
GetRefID for Stage interface
func (*ResizeServerGroupStage) GetType ¶
func (s *ResizeServerGroupStage) GetType() StageType
GetType for Stage interface
type Rollback ¶
type Rollback struct {
OnFailure bool `json:"onFailure"`
}
func NewRollback ¶
func NewRollback() *Rollback
type RollbackClusterStage ¶
type RollbackClusterStage struct { Notifications *[]*Notification `json:"notifications"` // contains filtered or unexported fields }
RollbackClusterStage for pipeline
func NewRollbackClusterStage ¶
func NewRollbackClusterStage() *RollbackClusterStage
NewRollbackClusterStage for pipeline
func (*RollbackClusterStage) GetName ¶
func (s *RollbackClusterStage) GetName() string
GetName for Stage interface
func (*RollbackClusterStage) GetRefID ¶
func (s *RollbackClusterStage) GetRefID() string
GetRefID for Stage interface
func (*RollbackClusterStage) GetType ¶
func (s *RollbackClusterStage) GetType() StageType
GetType for Stage interface
type SerializableNotification ¶
type SerializableNotification struct { ID string `json:"id,omitempty"` Address string `json:"address"` Level NotificationLevel `json:"level"` Type string `json:"type"` When []string `json:"when"` }
SerializableNotification for pipeline
type SerializablePipeline ¶
type SerializablePipeline struct { Application string `json:"application"` AppConfig map[string]interface{} `json:"appConfig"` Disabled bool `json:"disabled"` ID string `json:"id"` Index int `json:"index"` KeepWaitingPipelines bool `json:"keepWaitingPipelines"` LimitConcurrent bool `json:"limitConcurrent"` Name string `json:"name"` ParameterConfig *[]*PipelineParameter `json:"parameterConfig"` Roles *[]string `json:"roles"` ServiceAccount string `json:"serviceAccount,omitempty"` Triggers []*Trigger `json:"triggers"` }
SerializablePipeline deploy pipeline in application
func NewSerializablePipeline ¶
func NewSerializablePipeline() SerializablePipeline
NewSerializablePipeline Pipeline with default values
type SpinnakerError ¶
type SpinnakerError struct { ErrorMsg string `json:"error"` Exception string `json:"exception"` Message string `json:"message"` Status int `json:"status"` Timestamp string `json:"timestamp"` Body string `json:"body"` }
SpinnakerError Error response from spinnaker
func (*SpinnakerError) UnmarshalJSON ¶ added in v1.2.0
func (e *SpinnakerError) UnmarshalJSON(bytes []byte) error
type StageEnabled ¶
StageEnabled when stage is enabled
type StageExecutionWindow ¶
type StageExecutionWindow struct { Days []int `json:"days"` Jitter *StageExecutionWindowJitter `json:"jitter"` Whitelist *[]*StageExecutionWindowWhitelist `json:"whitelist"` }
StageExecutionWindow when to execute pipeline stage
type StageExecutionWindowJitter ¶
type StageExecutionWindowJitter struct { Enabled bool `json:"enabled"` MaxDelay int `json:"maxDelay"` MinDelay int `json:"minDelay"` SkipManual bool `json:"skipManual"` }
StageExecutionWindowJitter random jitter to add to execution window
type StageExecutionWindowWhitelist ¶
type StageExecutionWindowWhitelist struct { EndHour int `json:"endHour"` EndMin int `json:"endMin"` StartHour int `json:"startHour"` StartMin int `json:"startMin"` }
StageExecutionWindowWhitelist which hours to deploy
type StageMessage ¶
type StageMessage struct { Complete *MessageText `json:"stage.complete" mapstructure:"stage.complete"` Failed *MessageText `json:"stage.failed" mapstructure:"stage.failed"` Starting *MessageText `json:"stage.starting" mapstructure:"stage.starting"` }
StageMessage for Stage Notification
func (*StageMessage) CompleteText ¶
func (m *StageMessage) CompleteText() string
CompleteText for Message interface
func (*StageMessage) FailedText ¶
func (m *StageMessage) FailedText() string
FailedText for Message interface
func (*StageMessage) SetCompleteText ¶
func (m *StageMessage) SetCompleteText(text string)
SetCompleteText for Message interface
func (*StageMessage) SetFailedText ¶
func (m *StageMessage) SetFailedText(text string)
SetFailedText for Message interface
func (*StageMessage) SetStartingText ¶
func (m *StageMessage) SetStartingText(text string)
SetStartingText for Message interface
func (*StageMessage) StartingText ¶
func (m *StageMessage) StartingText() string
StartingText for Message interface
type StageType ¶
type StageType string
StageType type of stage
var BakeStageType StageType = "bake"
BakeStageType bake stage
var CanaryAnalysisStageType StageType = "kayentaCanary"
var DeleteManifestStageType StageType = "deleteManifest"
DeleteManifestStageType delete manifest stage
var DeployManifestStageType StageType = "deployManifest"
DeployManifestStageType deploy manifest stage
var DeployStageType StageType = "deploy"
DeployStageType deploy stage
var DestroyServerGroupStageType StageType = "destroyServerGroup"
DestroyServerGroupStageType destroy server group stage
var FindImageFromTagsStageType StageType = "findImageFromTags"
FindImageFromTagsStageType bake stage
var JenkinsStageType StageType = "jenkins"
JenkinsStageType jenkins stage
var ManualJudgmentStageType StageType = "manualJudgment"
ManualJudgmentStageType deploy stage
var PipelineStageType StageType = "pipeline"
PipelineStageType pipeline stage
var ResizeServerGroupStageType StageType = "resizeServerGroup"
ResizeServerGroupStageType resize server group stage
var RollbackClusterStageType StageType = "rollbackCluster"
RollbackClusterStageType rollback cluster stage
var WebhookStageType StageType = "webhook"
WebhookStageType bake stage
type Task ¶
type Task struct { Job *[]*Job `json:"job"` Application string `json:"application"` Description string `json:"description"` }
Task a job within an application
type TaskExecution ¶ added in v1.3.0
type TaskExecution struct { ID string `json:"id"` Name string `json:"name"` Application string `json:"application"` StartTime int `json:"startTime"` EndTime int `json:"endTime"` BuildTime int `json:"buildTime"` Status string `json:"status"` }
TaskExecution get status of task
type TaskResponse ¶ added in v1.3.0
type TaskResponse struct {
Ref string `json:"ref"`
}
TaskResponse ref for task execution
type TrafficManagement ¶ added in v1.2.0
type TrafficManagement struct { Enabled bool `json:"enabled"` Options *TrafficManagementOptions `json:"options"` }
func NewTrafficManagement ¶ added in v1.2.0
func NewTrafficManagement() *TrafficManagement
type TrafficManagementOptions ¶ added in v1.2.0
type TrafficManagementOptions struct {
EnableTraffic bool `json:"enableTraffic"`
}
func NewTrafficManagementOptions ¶ added in v1.2.0
func NewTrafficManagementOptions() *TrafficManagementOptions
type Trigger ¶
type Trigger struct { ID string `json:"id"` Enabled bool `json:"enabled"` Job string `json:"job"` Master string `json:"master"` PropertyFile string `json:"propertyFile"` RunAsUser string `json:"runAsUser,omitempty"` Type string `json:"type"` }
Trigger for Pipeline
type WebhookStage ¶ added in v1.3.0
type WebhookStage struct { Notifications *[]*Notification `json:"notifications"` // contains filtered or unexported fields }
WebhookStage for pipeline
func NewWebhookStage ¶ added in v1.3.0
func NewWebhookStage() *WebhookStage
NewWebhookStage for pipeline
func (*WebhookStage) GetName ¶ added in v1.3.0
func (s *WebhookStage) GetName() string
GetName for Stage interface
func (*WebhookStage) GetRefID ¶ added in v1.3.0
func (s *WebhookStage) GetRefID() string
GetRefID for Stage interface
func (*WebhookStage) GetType ¶ added in v1.3.0
func (s *WebhookStage) GetType() StageType
GetType for Stage interface
Source Files ¶
- application.go
- application_service.go
- bake_stage.go
- canary_analysis_config.go
- canary_analysis_config_scope.go
- canary_analysis_stage.go
- canary_config.go
- canary_config_classifier.go
- canary_config_judge.go
- canary_config_metric.go
- canary_config_metric_query.go
- canary_config_service.go
- capacity.go
- client.go
- client_auth.go
- delete_manifest_mode.go
- delete_manifest_options.go
- delete_manifest_stage.go
- deploy_manifest_source.go
- deploy_manifest_stage.go
- deploy_manifests.go
- deploy_stage.go
- deploy_stage_cluster.go
- destroy_server_group_stage.go
- find_image_from_tags_stage.go
- jenkins_stage.go
- job.go
- manual_judgment_stage.go
- message.go
- moniker.go
- notification.go
- notification_level.go
- pipeline.go
- pipeline_message.go
- pipeline_parameter.go
- pipeline_service.go
- pipeline_stage.go
- relationships.go
- resize_server_group_stage.go
- rollback.go
- rollback_cluster_stage.go
- spinnaker_error.go
- stage.go
- stage_execution_window.go
- stage_message.go
- stage_type.go
- task.go
- traffic_management.go
- traffic_management_options.go
- trigger.go
- webhook_stage.go