Function
GetSecretApp
(app string, entity SecretEntity)
Source from the content-addressed store, hash-verified
| 64 | } |
| 65 | |
| 66 | func GetSecretApp(app string, entity SecretEntity) (App, error) { |
| 67 | switch strings.ToLower(app) { |
| 68 | case Actions: |
| 69 | return Actions, nil |
| 70 | case Agents: |
| 71 | return Agents, nil |
| 72 | case Codespaces: |
| 73 | return Codespaces, nil |
| 74 | case Dependabot: |
| 75 | return Dependabot, nil |
| 76 | case "": |
| 77 | if entity == User { |
| 78 | return Codespaces, nil |
| 79 | } |
| 80 | return Actions, nil |
| 81 | default: |
| 82 | return Unknown, fmt.Errorf("invalid application: %s", app) |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | func IsSupportedSecretEntity(app App, entity SecretEntity) bool { |
| 87 | switch app { |