Skip to content

Commit 925898a

Browse files
authored
the code locked added (#210)
1 parent f2caf73 commit 925898a

File tree

4 files changed

+27
-3
lines changed

4 files changed

+27
-3
lines changed

cs3/gateway/v1beta1/gateway_api.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ service GatewayAPI {
216216

217217
// Creates a new share.
218218
// MUST return CODE_NOT_FOUND if the resource reference does not exist.
219+
// MUST return CODE_LOCKED if the resource reference already locked.
219220
// MUST return CODE_ALREADY_EXISTS if the share already exists for the 4-tuple consisting of
220221
// (owner, shared_resource, grantee).
221222
// New shares MUST be created in the state SHARE_STATE_PENDING.

cs3/rpc/v1beta1/code.proto

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,4 +191,11 @@ enum Code {
191191
//
192192
// HTTP Mapping: 507 Insufficient Storage
193193
CODE_INSUFFICIENT_STORAGE = 19;
194+
//
195+
// The ability to lock a resource is specific to some WebDAV servers.
196+
// The HTTP 423 Locked error response code indicates that either
197+
// the resources tentatively targeted by is locked, meaning it can't be accessed.
198+
//
199+
// HTTP Mapping: 423 Locked
200+
CODE_LOCKED = 20;
194201
}

cs3/sharing/collaboration/v1beta1/collaboration_api.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ import "google/protobuf/field_mask.proto";
5555
service CollaborationAPI {
5656
// Creates a new share.
5757
// MUST return CODE_NOT_FOUND if the resource reference does not exist.
58+
// MUST return CODE_LOCKED if the resource reference already locked.
5859
// MUST return CODE_ALREADY_EXISTS if the share already exists for the 4-tuple consisting of
5960
// (owner, shared_resource, grantee).
6061
// New shares MUST be created in the state SHARE_STATE_PENDING.

docs/index.html

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2863,6 +2863,7 @@ <h3 id="cs3.gateway.v1beta1.GatewayAPI">GatewayAPI</h3>
28632863
<td><a href="#cs3.sharing.collaboration.v1beta1.CreateShareResponse">.cs3.sharing.collaboration.v1beta1.CreateShareResponse</a></td>
28642864
<td><p>Creates a new share.
28652865
MUST return CODE_NOT_FOUND if the resource reference does not exist.
2866+
MUST return CODE_LOCKED if the resource reference already locked.
28662867
MUST return CODE_ALREADY_EXISTS if the share already exists for the 4-tuple consisting of
28672868
(owner, shared_resource, grantee).
28682869
New shares MUST be created in the state SHARE_STATE_PENDING.</p></td>
@@ -4081,6 +4082,16 @@ <h3 id="cs3.rpc.v1beta1.Code">Code</h3>
40814082
HTTP Mapping: 507 Insufficient Storage</p></td>
40824083
</tr>
40834084

4085+
<tr>
4086+
<td>CODE_LOCKED</td>
4087+
<td>20</td>
4088+
<td><p>The ability to lock a resource is specific to some WebDAV servers.
4089+
The HTTP 423 Locked error response code indicates that either
4090+
the resources tentatively targeted by is locked, meaning it can&#39;t be accessed.
4091+
4092+
HTTP Mapping: 423 Locked</p></td>
4093+
</tr>
4094+
40844095
</tbody>
40854096
</table>
40864097

@@ -10836,6 +10847,7 @@ <h3 id="cs3.sharing.collaboration.v1beta1.CollaborationAPI">CollaborationAPI</h3
1083610847
<td><a href="#cs3.sharing.collaboration.v1beta1.CreateShareResponse">CreateShareResponse</a></td>
1083710848
<td><p>Creates a new share.
1083810849
MUST return CODE_NOT_FOUND if the resource reference does not exist.
10850+
MUST return CODE_LOCKED if the resource reference already locked.
1083910851
MUST return CODE_ALREADY_EXISTS if the share already exists for the 4-tuple consisting of
1084010852
(owner, shared_resource, grantee).
1084110853
New shares MUST be created in the state SHARE_STATE_PENDING.</p></td>
@@ -13696,10 +13708,13 @@ <h3 id="cs3.sharing.ocm.v1beta1.ReceivedShare">ReceivedShare</h3>
1369613708
</tr>
1369713709

1369813710
<tr>
13699-
<td>resource_id</td>
13700-
<td><a href="#cs3.storage.provider.v1beta1.ResourceId">cs3.storage.provider.v1beta1.ResourceId</a></td>
13711+
<td>remote_share_id</td>
13712+
<td><a href="#string">string</a></td>
1370113713
<td></td>
13702-
<td><p>REQUIRED. </p></td>
13714+
<td><p>REQUIRED.
13715+
Identifier to identify the shared resource at the provider side.
13716+
This is unique per provider such that if the same resource is shared twice, this will not be repeated.
13717+
This correspond to the `providerId` in the OCM API specs. </p></td>
1370313718
</tr>
1370413719

1370513720
<tr>

0 commit comments

Comments
 (0)