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

Method CreateNode

data/source/sync/grpc/handler.go:351–365  ·  view source on GitHub ↗

CreateNode Forwards to Index

(ctx context.Context, req *tree.CreateNodeRequest)

Source from the content-addressed store, hash-verified

349
350// CreateNode Forwards to Index
351func (h *Handler) CreateNode(ctx context.Context, req *tree.CreateNodeRequest) (*tree.CreateNodeResponse, error) {
352
353 sh, ok := h.getSyncer(ctx)
354 if !ok {
355 return nil, errors.WithMessage(errors.StatusInternalServerError, "cannot find datasource in context")
356 }
357
358 resp := &tree.CreateNodeResponse{}
359 err := sh.S3client.(model.PathSyncTarget).CreateNode(ctx, req.Node, req.UpdateIfExists)
360 if err != nil {
361 return nil, err
362 }
363 resp.Node = req.Node
364 return resp, nil
365}
366
367// UpdateNode Forwards to S3
368func (h *Handler) UpdateNode(ctx context.Context, req *tree.UpdateNodeRequest) (*tree.UpdateNodeResponse, error) {

Callers

nothing calls this directly

Calls 2

getSyncerMethod · 0.95
CreateNodeMethod · 0.65

Tested by

no test coverage detected