MCPcopy Create free account
hub / github.com/pydio/cells / AddKey

Method AddKey

idm/key/grpc/handler.go:65–75  ·  view source on GitHub ↗
(ctx context.Context, req *enc.AddKeyRequest)

Source from the content-addressed store, hash-verified

63}
64
65func (ukm *userKeyStore) AddKey(ctx context.Context, req *enc.AddKeyRequest) (*enc.AddKeyResponse, error) {
66 dao, err := manager.Resolve[key.DAO](ctx)
67 if err != nil {
68 return nil, err
69 }
70 if err := seal(req.Key, []byte(req.StrPassword)); err != nil {
71 return nil, err
72 }
73
74 return &enc.AddKeyResponse{}, dao.SaveKey(ctx, req.Key)
75}
76
77func (ukm *userKeyStore) GetKey(ctx context.Context, req *enc.GetKeyRequest) (*enc.GetKeyResponse, error) {
78

Callers

nothing calls this directly

Calls 2

sealFunction · 0.85
SaveKeyMethod · 0.65

Tested by

no test coverage detected