MCPcopy
hub / github.com/PeerDB-io/peerdb / Get

Method Get

flow/shared/crypto.go:43–55  ·  view source on GitHub ↗
(id string)

Source from the content-addressed store, hash-verified

41type PeerDBEncKeys []PeerDBEncKey
42
43func (e PeerDBEncKeys) Get(id string) (PeerDBEncKey, error) {
44 if id == "" {
45 return PeerDBEncKey{}, nil
46 }
47
48 for _, key := range e {
49 if key.ID == id {
50 return key, nil
51 }
52 }
53
54 return PeerDBEncKey{}, fmt.Errorf("failed to find encryption key %s", id)
55}
56
57const nonceSize = chacha20poly1305.NonceSizeX
58

Callers 15

sensitiveJSONFieldsFunction · 0.45
LuaRowNewIndexFunction · 0.45
LuaUUIDFunction · 0.45
LuaTimeFunction · 0.45
LuaParseDecimalFunction · 0.45
LuaTypeFunction · 0.45
LuaToStringFunction · 0.45
decimalBinopFunction · 0.45
RecordSlotSizeWorkflowFunction · 0.45
HeartbeatFlowWorkflowFunction · 0.45
ScheduledTasksWorkflowFunction · 0.45

Calls

no outgoing calls

Tested by 2

TestQRepPauseMethod · 0.36
TestXminPauseMethod · 0.36