MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / renderProviderKeys

Function renderProviderKeys

internal/tui/keys_tab.go:379–398  ·  view source on GitHub ↗
(sb *strings.Builder, title string, keys []map[string]any)

Source from the content-addressed store, hash-verified

377}
378
379func renderProviderKeys(sb *strings.Builder, title string, keys []map[string]any) {
380 if len(keys) == 0 {
381 return
382 }
383 renderSection(sb, title, len(keys))
384 for i, key := range keys {
385 apiKey := getString(key, "api-key")
386 prefix := getString(key, "prefix")
387 baseURL := getString(key, "base-url")
388 info := maskKey(apiKey)
389 if prefix != "" {
390 info += " (prefix: " + prefix + ")"
391 }
392 if baseURL != "" {
393 info += " → " + baseURL
394 }
395 sb.WriteString(fmt.Sprintf(" %d. %s\n", i+1, info))
396 }
397 sb.WriteString("\n")
398}
399
400func maskKey(key string) string {
401 if len(key) <= 8 {

Callers 1

renderContentMethod · 0.85

Calls 4

renderSectionFunction · 0.85
getStringFunction · 0.85
maskKeyFunction · 0.85
WriteStringMethod · 0.80

Tested by

no test coverage detected