github.com/kyma-project/kyma-environment-broker@v0.0.1/cmd/subscriptioncleanup/model/types.go (about) 1 package model 2 3 import "fmt" 4 5 type HyperscalerType string 6 7 const ( 8 GCP HyperscalerType = "gcp" 9 Azure HyperscalerType = "azure" 10 AWS HyperscalerType = "aws" 11 ) 12 13 func NewHyperscalerType(provider string) (HyperscalerType, error) { 14 15 hyperscalerType := HyperscalerType(provider) 16 17 switch hyperscalerType { 18 case GCP, Azure, AWS: 19 return hyperscalerType, nil 20 } 21 return "", fmt.Errorf("unknown Hyperscaler provider type: %s", provider) 22 }