MCPcopy Create free account
hub / github.com/github/gh-aw / GetAllEngineSecretNames

Function GetAllEngineSecretNames

pkg/constants/engine_constants.go:176–207  ·  view source on GitHub ↗

GetAllEngineSecretNames returns all unique secret names across all configured engines. This includes primary secrets, alternative secrets, and system-level secrets. The returned slice contains no duplicates.

()

Source from the content-addressed store, hash-verified

174// This includes primary secrets, alternative secrets, and system-level secrets.
175// The returned slice contains no duplicates.
176func GetAllEngineSecretNames() []string {
177 seen := make(map[string]struct {
178 })
179 var secrets []string
180
181 // Add primary and alternative secrets from all engines
182 for _, opt := range EngineOptions {
183 if opt.SecretName != "" && !setutil.Contains(seen, opt.SecretName) {
184 seen[opt.SecretName] = struct {
185 }{}
186 secrets = append(secrets, opt.SecretName)
187 }
188 for _, alt := range opt.AlternativeSecrets {
189 if alt != "" && !setutil.Contains(seen, alt) {
190 seen[alt] = struct {
191 }{}
192 secrets = append(secrets, alt)
193 }
194 }
195 }
196
197 // Add system-level secrets from SystemSecrets
198 for _, s := range SystemSecrets {
199 if s.Name != "" && !setutil.Contains(seen, s.Name) {
200 seen[s.Name] = struct {
201 }{}
202 secrets = append(secrets, s.Name)
203 }
204 }
205
206 return secrets
207}
208
209// Primary secret names for each engine — the GitHub secret names that users configure
210// when setting up an engine workflow.

Calls 1

ContainsFunction · 0.92