MCPcopy Index your code
hub / github.com/coder/coder / toSDKKeys

Function toSDKKeys

coderd/cryptokeys/cache.go:388–394  ·  view source on GitHub ↗

We have to do this to avoid a circular dependency on db2sdk (cryptokeys -> db2sdk -> tailnet -> cryptokeys)

(keys []database.CryptoKey)

Source from the content-addressed store, hash-verified

386
387// We have to do this to avoid a circular dependency on db2sdk (cryptokeys -> db2sdk -> tailnet -> cryptokeys)
388func toSDKKeys(keys []database.CryptoKey) []codersdk.CryptoKey {
389 into := make([]codersdk.CryptoKey, 0, len(keys))
390 for _, key := range keys {
391 into = append(into, toSDK(key))
392 }
393 return into
394}
395
396func toSDK(key database.CryptoKey) codersdk.CryptoKey {
397 return codersdk.CryptoKey{

Callers 1

FetchMethod · 0.85

Calls 1

toSDKFunction · 0.85

Tested by

no test coverage detected