(ctx context.Context, rc requestContext)
| 33 | } |
| 34 | |
| 35 | func handleMountGet(ctx context.Context, rc requestContext) (any, *apiError) { |
| 36 | oid, err := object.ParseID(rc.muxVar("rootObjectID")) |
| 37 | if err != nil { |
| 38 | return nil, requestError(serverapi.ErrorMalformedRequest, "invalid root object ID") |
| 39 | } |
| 40 | |
| 41 | c, err := rc.srv.getMountController(ctx, rc.rep, oid, false) |
| 42 | if err != nil { |
| 43 | return nil, internalServerError(err) |
| 44 | } |
| 45 | |
| 46 | if c == nil { |
| 47 | return nil, notFoundError("mount point not found") |
| 48 | } |
| 49 | |
| 50 | return &serverapi.MountedSnapshot{ |
| 51 | Path: c.MountPath(), |
| 52 | Root: oid, |
| 53 | }, nil |
| 54 | } |
| 55 | |
| 56 | func handleMountDelete(ctx context.Context, rc requestContext) (any, *apiError) { |
| 57 | oid, err := object.ParseID(rc.muxVar("rootObjectID")) |
nothing calls this directly
no test coverage detected