MCPcopy Create free account
hub / github.com/OctopusDeploy/cli / mapVariableType

Function mapVariableType

pkg/cmd/project/variables/create/create.go:434–457  ·  view source on GitHub ↗
(varType string)

Source from the content-addressed store, hash-verified

432}
433
434func 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
459func mapControlType(promptType string) (resources.ControlType, error) {
460 switch promptType {

Callers 2

CreateRunFunction · 0.85
PromptMissingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected