api

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrCodeNoSuchEntityException = "NoSuchEntityException"
)

Variables

View Source
var (
	// CloudProviders ...
	// See details in Spinnaker Orca
	// ref: https://github.com/spinnaker/orca/blob/master/orca-applications/src/main/groovy/com/netflix/spinnaker/orca/applications/utils/ApplicationNameValidator.groovy
	CloudProviders = map[string]applicationNameConstraint{
		"appengine":    {58, `^[a-z0-9]*$`},
		"aws":          {250, `^[a-zA-Z_0-9.]*$`},
		"dcos":         {127, `^[a-z0-9]*$`},
		"kubernetes":   {63, `^([a-zA-Z][a-zA-Z0-9-]*)$`},
		"gce":          {63, `^([a-zA-Z][a-zA-Z0-9]*)?$`},
		"openstack":    {250, `^[a-zA-Z_0-9.]*$`},
		"tencentcloud": {50, `^[a-zA-Z_0-9.\u4e00-\u9fa5-]*$`},
		"titus":        {250, `^[a-zA-Z_0-9.]*$`},
	}

	// SupportedAccesses is a list for Spinnaker application level
	// See details here
	// ref: https://spinnaker.io/setup/security/authorization/
	SupportedAccesses = []string{"READ", "WRITE", "EXECUTE"}
)
View Source
var (
	AllowedAligners = []string{
		"ALIGN_NONE",
		"ALIGN_DELTA",
		"ALIGN_RATE",
		"ALIGN_INTERPORATE",
		"ALIGN_NEXT_ORDER",
		"ALIGN_MIN",
		"ALIGN_MAX",
		"ALIGN_MEAN",
		"ALIGN_COUNT",
		"ALIGN_SUM",
		"ALIGN_STDDEV",
		"ALIGN_COUNT_TRUE",
		"ALIGN_COUNT_FALSE",
		"ALIGN_FRACTION_TRUE",
		"ALIGN_PERCENTILE_99",
		"ALIGN_PERCENTILE_95",
		"ALIGN_PERCENTILE_50",
		"ALIGN_PERCENTILE_05",
		"ALIGN_PERCENTILE_CHANGE"}
	AllowedReducers = []string{
		"REDUCE_NONE",
		"REDUCE_MEAN",
		"REDUCE_MAX",
		"REDUCE_MIN",
		"REDUCE_COUNT_TRUE",
		"REDUCE_COUNT_FALSE",
		"REDUCE_FRACTION_TRUE",
		"ALIGN_FRACTION_99",
		"ALIGN_FRACTION_95",
		"ALIGN_FRACTION_50",
		"ALIGN_FRACTION_05",
	}
	AllowedDirections = []string{
		"increase",
		"decrease",
		"either",
	}
	AllowedNaNStrategies = []string{
		"remove",
		"replace",
	}
	AllowedOutlierStrategies = []string{
		"remove",
		"keep",
	}
)

Functions

func CreateApplication

func CreateApplication(client *gate.GatewayClient, createAppTask CreateApplicationTask) error

CreateApplication creates passed application

func CreateCanaryConfig

func CreateCanaryConfig(client *gate.GatewayClient, config CanaryConfig) (string, error)

CreateCanaryConfig creates passed canary config

func CreatePipeline

func CreatePipeline(client *gate.GatewayClient, pipeline interface{}) error

func CreatePipelineTemplate

func CreatePipelineTemplate(client *gate.GatewayClient, template interface{}) error

func CreateProject

func CreateProject(client *gate.GatewayClient, upsertProjectTask UpsertApplicationTask) error

CreateProject creates passed project

func DeleteApplication

func DeleteApplication(client *gate.GatewayClient, appName string) error

DeleteApplication deletes an application by application name

func DeleteCanaryConfig

func DeleteCanaryConfig(client *gate.GatewayClient, id string) error

func DeletePipeline

func DeletePipeline(client *gate.GatewayClient, applicationName, pipelineName string) error

func DeletePipelineTemplate

func DeletePipelineTemplate(client *gate.GatewayClient, templateID string) error

func DeleteProject

func DeleteProject(client *gate.GatewayClient, id string, projectName string) error

DeleteProject deletes a project by project name

func GetApplication

func GetApplication(client *gate.GatewayClient, appName string, dest interface{}) error

GetApplication gets an application from Spinnaker Gate

func GetApplicationName

func GetApplicationName(d *schema.ResourceData) string

func GetCanaryConfig

func GetCanaryConfig(client *gate.GatewayClient, id string, dest interface{}) error

func GetPipeline

func GetPipeline(client *gate.GatewayClient, applicationName, pipelineName string, dest interface{}) (map[string]interface{}, error)

func GetPipelineTemplate

func GetPipelineTemplate(client *gate.GatewayClient, templateID string, dest interface{}) error

func GetProject

func GetProject(client *gate.GatewayClient, projectName string, dest interface{}) error

GetApplication gets an application from Spinnaker Gate

func UpdateCanaryConfig

func UpdateCanaryConfig(client *gate.GatewayClient, id string, config CanaryConfig) error

func UpdatePipeline

func UpdatePipeline(client *gate.GatewayClient, pipelineID string, pipeline interface{}) error

func UpdatePipelineTemplate

func UpdatePipelineTemplate(client *gate.GatewayClient, templateID string, template interface{}) error

Types

type CanaryConfig

type CanaryConfig map[string]interface{}

func NewCanaryConfig

func NewCanaryConfig(d *schema.ResourceData) (CanaryConfig, error)

type Classifier

type Classifier = map[string]interface{}

type CreateApplicationTask

type CreateApplicationTask map[string]interface{}

CreateApplicationTask represents the Spinnaker createApplication Application API object

func NewCreateApplicationTask

func NewCreateApplicationTask(d *schema.ResourceData) (CreateApplicationTask, error)

NewCreateApplicationTask returns a Spinanker createApplication Application API object by passed resource data configued

type Metric

type Metric map[string]interface{}

type Metrics

type Metrics []map[string]interface{}

type Query

type Query = map[string]interface{}

type UpsertApplicationTask

type UpsertApplicationTask map[string]interface{}

UpseartApplicationTask represents the Spinnaker createApplication Application API object

func NewUpsertApplicationTask

func NewUpsertApplicationTask(d *schema.ResourceData) (UpsertApplicationTask, error)

NewUpsertApplicationTask returns a Spinnaker upsertApplication Application API object by passed resource data configured

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL