Documentation
¶
Overview ¶
Package model contains definitions of model objects that are stored in the datastore.
Index ¶
- Constants
- func ApplicationKindStrings() []string
- func CanUpdateDeploymentStatus(cur, next DeploymentStatus) bool
- func CanUpdateStageStatus(cur, next StageStatus) bool
- func DeploymentStatusStrings() []string
- func ExtractAPIKeyID(key string) (string, error)
- func GenerateAPIKey(id string) (key, hash string, err error)
- func GeneratePipedKey() (key, hash string, err error)
- func GenerateRandomString(n int) string
- func IsCompletedDeployment(status DeploymentStatus) bool
- func IsCompletedStage(status StageStatus) bool
- type AnalysisProviderType
- type CloudProviderType
- type DataStoreType
- type Event
- type FileStoreType
- type ImageName
- type ImageProviderType
- type ImageRef
- type ReportableCommand
- type SealedSecretManagementType
- type Stage
Constants ¶
const DefaultDeploymentConfigFileName = ".pipe.yaml"
Variables ¶
This section is empty.
Functions ¶
func ApplicationKindStrings ¶ added in v0.9.3
func ApplicationKindStrings() []string
ApplicationKindStrings returns a list of available deployment kinds in string.
func CanUpdateDeploymentStatus ¶
func CanUpdateDeploymentStatus(cur, next DeploymentStatus) bool
CanUpdateDeploymentStatus checks whether the deployment can transit to the given status.
func CanUpdateStageStatus ¶
func CanUpdateStageStatus(cur, next StageStatus) bool
CanUpdateStageStatus checks whether the stage can transit to the given status.
func DeploymentStatusStrings ¶ added in v0.9.1
func DeploymentStatusStrings() []string
DeploymentStatusStrings returns a list of available deployment statuses in string.
func ExtractAPIKeyID ¶ added in v0.9.1
func GenerateAPIKey ¶ added in v0.9.1
func GeneratePipedKey ¶ added in v0.1.1
GeneratePipedKey generates a new key for piped. This returns raw key value for used by piped and a hash value of the key for storing in datastore.
func GenerateRandomString ¶ added in v0.6.0
GenerateRandomString makes a random string with the given length. This implementation was referenced from the link below. https://stackoverflow.com/questions/22892120/how-to-generate-a-random-string-of-a-fixed-length-in-go
func IsCompletedDeployment ¶
func IsCompletedDeployment(status DeploymentStatus) bool
IsCompletedDeployment checks whether the deployment is at a completion state.
func IsCompletedStage ¶
func IsCompletedStage(status StageStatus) bool
IsCompletedStage checks whether the stage is at a completion state.
Types ¶
type AnalysisProviderType ¶
type AnalysisProviderType string
const ( AnalysisProviderPrometheus AnalysisProviderType = "PROMETHEUS" AnalysisProviderDatadog AnalysisProviderType = "DATADOG" AnalysisProviderStackdriver AnalysisProviderType = "STACKDRIVER" )
func (AnalysisProviderType) String ¶
func (t AnalysisProviderType) String() string
type CloudProviderType ¶
type CloudProviderType string
const ( CloudProviderKubernetes CloudProviderType = "KUBERNETES" CloudProviderTerraform CloudProviderType = "TERRAFORM" CloudProviderCloudRun CloudProviderType = "CLOUDRUN" CloudProviderLambda CloudProviderType = "LAMBDA" )
func (CloudProviderType) String ¶
func (t CloudProviderType) String() string
type DataStoreType ¶
type DataStoreType string
const ( DataStoreFirestore DataStoreType = "FIRESTORE" DataStoreDynamoDB DataStoreType = "DYNAMODB" DataStoreMongoDB DataStoreType = "MONGODB" )
func (DataStoreType) String ¶
func (t DataStoreType) String() string
type FileStoreType ¶
type FileStoreType string
const ( FileStoreGCS FileStoreType = "GCS" FileStoreS3 FileStoreType = "S3" FileStoreMINIO FileStoreType = "MINIO" )
func (FileStoreType) String ¶
func (t FileStoreType) String() string
type ImageName ¶ added in v0.9.1
ImageName represents an untagged image. Note that images may have the domain omitted (e.g. Docker Hub). If they only have single path element, the prefix `library` is implied.
Examples:
- alpine
- library/alpine
- gcr.io/pipecd/helloworld
type ImageProviderType ¶ added in v0.7.5
type ImageProviderType string
const ( ImageProviderTypeDockerHub ImageProviderType = "DOCKER_HUB" ImageProviderTypeGCR ImageProviderType = "GCR" ImageProviderTypeECR ImageProviderType = "ECR" )
func (ImageProviderType) String ¶ added in v0.7.5
func (t ImageProviderType) String() string
type ImageRef ¶ added in v0.9.1
ImageRef represents a tagged image. The tag is allowed to be empty, though it is in general undefined what that means
Examples:
- alpine:3.0
- library/alpine:3.0
- gcr.io/pipecd/helloworld:0.1.0
type ReportableCommand ¶
type SealedSecretManagementType ¶ added in v0.8.0
type SealedSecretManagementType string
const ( SealedSecretManagementNone SealedSecretManagementType = "NONE" SealedSecretManagementSealingKey SealedSecretManagementType = "SEALING_KEY" SealedSecretManagementGCPKMS SealedSecretManagementType = "GCP_KMS" SealedSecretManagementAWSKMS SealedSecretManagementType = "AWS_KMS" )
func (SealedSecretManagementType) String ¶ added in v0.8.0
func (t SealedSecretManagementType) String() string
type Stage ¶
type Stage string
Stage represents the middle and temporary state of application before reaching its final desired state.
const ( // StageWait represents the waiting state for a specified period of time. StageWait Stage = "WAIT" // StageWaitApproval represents the waiting state until getting an approval // from one of the specified approvers. StageWaitApproval Stage = "WAIT_APPROVAL" // StageAnalysis represents the waiting state for analysing // the application status based on metrics, log, http request... StageAnalysis Stage = "ANALYSIS" // StageK8sSync represents the state where // all resources should be synced with the Git state. StageK8sSync Stage = "K8S_SYNC" // StageK8sPrimaryRollout represents the state where // the PRIMARY variant resources has been updated to the new version/configuration. StageK8sPrimaryRollout Stage = "K8S_PRIMARY_ROLLOUT" // StageK8sCanaryRollout represents the state where // the CANARY variant resources has been rolled out with the new version/configuration. StageK8sCanaryRollout Stage = "K8S_CANARY_ROLLOUT" // StageK8sCanaryClean represents the state where // the CANARY variant resources has been cleaned. StageK8sCanaryClean Stage = "K8S_CANARY_CLEAN" // StageK8sBaselineRollout represents the state where // the BASELINE variant resources has been rolled out. StageK8sBaselineRollout Stage = "K8S_BASELINE_ROLLOUT" // StageK8sBaselineClean represents the state where // the BASELINE variant resources has been cleaned. StageK8sBaselineClean Stage = "K8S_BASELINE_CLEAN" // StageK8sTrafficRouting represents the state where the traffic to application // should be splitted as the specified percentage to PRIMARY, CANARY, BASELINE variants. StageK8sTrafficRouting Stage = "K8S_TRAFFIC_ROUTING" // StageTerraformSync synced infrastructure with all the tf defined in Git. // Firstly, it does plan and if there are any changes detected it applies those changes automatically. StageTerraformSync Stage = "TERRAFORM_SYNC" // StageTerraformPlan shows terraform plan result. StageTerraformPlan Stage = "TERRAFORM_PLAN" // StageTerraformApply represents the state where // the new configuration has been applied. StageTerraformApply Stage = "TERRAFORM_APPLY" // StageCloudRunSync does quick sync by rolling out the new version // and switching all traffic to it. StageCloudRunSync Stage = "CLOUDRUN_SYNC" // StageCloudRunPromote promotes the new version to receive amount of traffic. StageCloudRunPromote Stage = "CLOUDRUN_PROMOTE" // StageLambdaSync does quick sync by rolling out the new version // and switching all traffic to it. StageLambdaSync Stage = "LAMBDA_SYNC" // StageLambdaCanaryRollout represents the state where // the workloads of the new version has been rolled out. StageLambdaCanaryRollout Stage = "LAMBDA_CANARY_ROLLOUT" // StageLambdaPromote prmotes the new version to receive amount of traffic. StageLambdaPromote Stage = "LAMBDA_PROMOTE" // StageRollback represents a state where // the all temporarily created stages will be reverted to // bring back the pre-deploy stage. // This stage is AUTOMATICALLY GENERATED and can not be used // to specify in configuration file. StageRollback Stage = "ROLLBACK" )