(ctx context.Context, rc requestContext)
| 54 | } |
| 55 | |
| 56 | func handleMountDelete(ctx context.Context, rc requestContext) (any, *apiError) { |
| 57 | oid, err := object.ParseID(rc.muxVar("rootObjectID")) |
| 58 | if err != nil { |
| 59 | return nil, requestError(serverapi.ErrorMalformedRequest, "invalid root object ID") |
| 60 | } |
| 61 | |
| 62 | c, err := rc.srv.getMountController(ctx, rc.rep, oid, false) |
| 63 | if err != nil { |
| 64 | return nil, internalServerError(err) |
| 65 | } |
| 66 | |
| 67 | if c == nil { |
| 68 | return nil, notFoundError("mount point not found") |
| 69 | } |
| 70 | |
| 71 | if err := c.Unmount(ctx); err != nil { |
| 72 | return nil, internalServerError(err) |
| 73 | } |
| 74 | |
| 75 | rc.srv.deleteMount(oid) |
| 76 | |
| 77 | return &serverapi.Empty{}, nil |
| 78 | } |
| 79 | |
| 80 | func handleMountList(_ context.Context, rc requestContext) (any, *apiError) { |
| 81 | res := &serverapi.MountedSnapshots{ |
nothing calls this directly
no test coverage detected