MCPcopy Create free account
hub / github.com/docker/secrets-engine / Upsert

Method Upsert

store/store.go:93–93  ·  view source on GitHub ↗

Upsert atomically replaces an existing credential or inserts a new one. On stores that do not support overwriting (e.g. macOS Keychain), it deletes the existing credential and then saves the new one under a mutex to ensure the two operations are not interleaved.

(ctx context.Context, id ID, secret Secret)

Source from the content-addressed store, hash-verified

91 // deletes the existing credential and then saves the new one under a mutex
92 // to ensure the two operations are not interleaved.
93 Upsert(ctx context.Context, id ID, secret Secret) error
94 // Filter returns a map of secrets based on a [Pattern].
95 //
96 // Secrets returned will have both [Secret.SetMetadata] and [Secret.Unmarshal]

Callers 4

TestUpsertFunction · 0.65
TestKeychainFunction · 0.65
TestPOSIXAgeFunction · 0.65
SetCommandFunction · 0.65

Implementers 2

MockStorestore/mocks/mock_store.go
MockStoreplugins/pass/teststore/teststore.go

Calls

no outgoing calls

Tested by 3

TestUpsertFunction · 0.52
TestKeychainFunction · 0.52
TestPOSIXAgeFunction · 0.52