Skip to content

Commit

Permalink
add TouchFile (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
wkloucek authored Dec 13, 2021
1 parent 9648574 commit 50cca47
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cs3/gateway/v1beta1/gateway_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ service GatewayAPI {
// MUST return CODE_PRECONDITION_FAILED if the container
// cannot be created at the specified reference.
rpc CreateContainer(cs3.storage.provider.v1beta1.CreateContainerRequest) returns (cs3.storage.provider.v1beta1.CreateContainerResponse);
// Creates a new resource of type file.
// MUST return CODE_PRECONDITION_FAILED if the file
// cannot be created at the specified reference.
rpc TouchFile(cs3.storage.provider.v1beta1.TouchFileRequest) returns (cs3.storage.provider.v1beta1.TouchFileResponse);
// Deletes a resource.
// If a resource specifies the non-empty container (directory, ...),
// then the entire directory is deleted recursively.
Expand Down
22 changes: 22 additions & 0 deletions cs3/storage/provider/v1beta1/provider_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ service ProviderAPI {
// MUST return CODE_PRECONDITION_FAILED if the container
// cannot be created at the specified reference.
rpc CreateContainer(CreateContainerRequest) returns (CreateContainerResponse);
// Creates a new resource of type file.
// MUST return CODE_PRECONDITION_FAILED if the file
// cannot be created at the specified reference.
rpc TouchFile(TouchFileRequest) returns (TouchFileResponse);
// Deletes a resource.
// If a resource specifies the non-empty container (directory, ...),
// then the entire directory is deleted recursively.
Expand Down Expand Up @@ -237,6 +241,24 @@ message CreateContainerResponse {
cs3.types.v1beta1.Opaque opaque = 2;
}

message TouchFileRequest {
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 1;
// REQUIRED.
// The reference to which the action should be performed.
Reference ref = 2;
}

message TouchFileResponse {
// REQUIRED.
// The response status.
cs3.rpc.v1beta1.Status status = 1;
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 2;
}

message DeleteRequest {
// OPTIONAL.
// Opaque information.
Expand Down
92 changes: 92 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1722,6 +1722,14 @@ <h2>Table of Contents</h2>
<a href="#cs3.storage.provider.v1beta1.StatResponse"><span class="badge">M</span>StatResponse</a>
</li>

<li>
<a href="#cs3.storage.provider.v1beta1.TouchFileRequest"><span class="badge">M</span>TouchFileRequest</a>
</li>

<li>
<a href="#cs3.storage.provider.v1beta1.TouchFileResponse"><span class="badge">M</span>TouchFileResponse</a>
</li>

<li>
<a href="#cs3.storage.provider.v1beta1.UnsetArbitraryMetadataRequest"><span class="badge">M</span>UnsetArbitraryMetadataRequest</a>
</li>
Expand Down Expand Up @@ -2418,6 +2426,15 @@ <h3 id="cs3.gateway.v1beta1.GatewayAPI">GatewayAPI</h3>
cannot be created at the specified reference.</p></td>
</tr>

<tr>
<td>TouchFile</td>
<td><a href="#cs3.storage.provider.v1beta1.TouchFileRequest">.cs3.storage.provider.v1beta1.TouchFileRequest</a></td>
<td><a href="#cs3.storage.provider.v1beta1.TouchFileResponse">.cs3.storage.provider.v1beta1.TouchFileResponse</a></td>
<td><p>Creates a new resource of type file.
MUST return CODE_PRECONDITION_FAILED if the file
cannot be created at the specified reference.</p></td>
</tr>

<tr>
<td>Delete</td>
<td><a href="#cs3.storage.provider.v1beta1.DeleteRequest">.cs3.storage.provider.v1beta1.DeleteRequest</a></td>
Expand Down Expand Up @@ -14950,6 +14967,72 @@ <h3 id="cs3.storage.provider.v1beta1.StatResponse">StatResponse</h3>



<h3 id="cs3.storage.provider.v1beta1.TouchFileRequest">TouchFileRequest</h3>
<p></p>


<table class="field-table">
<thead>
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>

<tr>
<td>opaque</td>
<td><a href="#cs3.types.v1beta1.Opaque">cs3.types.v1beta1.Opaque</a></td>
<td></td>
<td><p>OPTIONAL.
Opaque information. </p></td>
</tr>

<tr>
<td>ref</td>
<td><a href="#cs3.storage.provider.v1beta1.Reference">Reference</a></td>
<td></td>
<td><p>REQUIRED.
The reference to which the action should be performed. </p></td>
</tr>

</tbody>
</table>





<h3 id="cs3.storage.provider.v1beta1.TouchFileResponse">TouchFileResponse</h3>
<p></p>


<table class="field-table">
<thead>
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>

<tr>
<td>status</td>
<td><a href="#cs3.rpc.v1beta1.Status">cs3.rpc.v1beta1.Status</a></td>
<td></td>
<td><p>REQUIRED.
The response status. </p></td>
</tr>

<tr>
<td>opaque</td>
<td><a href="#cs3.types.v1beta1.Opaque">cs3.types.v1beta1.Opaque</a></td>
<td></td>
<td><p>OPTIONAL.
Opaque information. </p></td>
</tr>

</tbody>
</table>





<h3 id="cs3.storage.provider.v1beta1.UnsetArbitraryMetadataRequest">UnsetArbitraryMetadataRequest</h3>
<p></p>

Expand Down Expand Up @@ -15243,6 +15326,15 @@ <h3 id="cs3.storage.provider.v1beta1.ProviderAPI">ProviderAPI</h3>
cannot be created at the specified reference.</p></td>
</tr>

<tr>
<td>TouchFile</td>
<td><a href="#cs3.storage.provider.v1beta1.TouchFileRequest">TouchFileRequest</a></td>
<td><a href="#cs3.storage.provider.v1beta1.TouchFileResponse">TouchFileResponse</a></td>
<td><p>Creates a new resource of type file.
MUST return CODE_PRECONDITION_FAILED if the file
cannot be created at the specified reference.</p></td>
</tr>

<tr>
<td>Delete</td>
<td><a href="#cs3.storage.provider.v1beta1.DeleteRequest">DeleteRequest</a></td>
Expand Down

0 comments on commit 50cca47

Please sign in to comment.