(varType string)
| 432 | } |
| 433 | |
| 434 | func mapVariableType(varType string) (string, error) { |
| 435 | if varType == "" { |
| 436 | varType = TypeText |
| 437 | } |
| 438 | |
| 439 | switch varType { |
| 440 | case TypeText: |
| 441 | return "String", nil |
| 442 | case TypeSensitive: |
| 443 | return "Sensitive", nil |
| 444 | case TypeAwsAccount: |
| 445 | return "AmazonWebServicesAccount", nil |
| 446 | case TypeWorkerPool: |
| 447 | return "WorkerPool", nil |
| 448 | case TypeAzureAccount: |
| 449 | return "AzureAccount", nil |
| 450 | case TypeCertificate: |
| 451 | return "Certificate", nil |
| 452 | case TypeGoogleAccount: |
| 453 | return "GoogleCloudAccount", nil |
| 454 | default: |
| 455 | return "", fmt.Errorf("unknown variable type '%s', valid values are '%s','%s','%s', '%s', '%s', '%s', '%s'", varType, TypeText, TypeSensitive, TypeAzureAccount, TypeAwsAccount, TypeGoogleAccount, TypeWorkerPool, TypeCertificate) |
| 456 | } |
| 457 | } |
| 458 | |
| 459 | func mapControlType(promptType string) (resources.ControlType, error) { |
| 460 | switch promptType { |
no outgoing calls
no test coverage detected