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

Method SetSecretsCommand

pkg/wshrpc/wshserver/wshserver.go:1497–1512  ·  view source on GitHub ↗
(ctx context.Context, secrets map[string]*string)

Source from the content-addressed store, hash-verified

1495}
1496
1497func (ws *WshServer) SetSecretsCommand(ctx context.Context, secrets map[string]*string) error {
1498 for name, value := range secrets {
1499 if value == nil {
1500 err := secretstore.DeleteSecret(name)
1501 if err != nil {
1502 return fmt.Errorf("error deleting secret %q: %w", name, err)
1503 }
1504 } else {
1505 err := secretstore.SetSecret(name, *value)
1506 if err != nil {
1507 return fmt.Errorf("error setting secret %q: %w", name, err)
1508 }
1509 }
1510 }
1511 return nil
1512}
1513
1514func (ws *WshServer) GetSecretsLinuxStorageBackendCommand(ctx context.Context) (string, error) {
1515 backend, err := secretstore.GetLinuxStorageBackend()

Callers

nothing calls this directly

Calls 2

DeleteSecretFunction · 0.92
SetSecretFunction · 0.92

Tested by

no test coverage detected