MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / GetSecretsCommand

Method GetSecretsCommand

pkg/wshrpc/wshserver/wshserver.go:1475–1487  ·  view source on GitHub ↗
(ctx context.Context, names []string)

Source from the content-addressed store, hash-verified

1473}
1474
1475func (ws *WshServer) GetSecretsCommand(ctx context.Context, names []string) (map[string]string, error) {
1476 result := make(map[string]string)
1477 for _, name := range names {
1478 value, exists, err := secretstore.GetSecret(name)
1479 if err != nil {
1480 return nil, fmt.Errorf("error getting secret %q: %w", name, err)
1481 }
1482 if exists {
1483 result[name] = value
1484 }
1485 }
1486 return result, nil
1487}
1488
1489func (ws *WshServer) GetSecretsNamesCommand(ctx context.Context) ([]string, error) {
1490 names, err := secretstore.GetSecretNames()

Callers

nothing calls this directly

Calls 1

GetSecretFunction · 0.92

Tested by

no test coverage detected