Skip to content

Commit

Permalink
add admin api
Browse files Browse the repository at this point in the history
add a new admin api with a delete home method
  • Loading branch information
David Christofas committed Nov 5, 2020
1 parent a6cf2aa commit f671ad5
Show file tree
Hide file tree
Showing 2 changed files with 196 additions and 0 deletions.
73 changes: 73 additions & 0 deletions cs3/admin/v1beta1/admin_api.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// Copyright 2020 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// In applying this license, CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

syntax = "proto3";

package cs3.admin.v1beta1;

option csharp_namespace = "Cs3.Admin.V1Beta1";
option go_package = "adminv1beta1";
option java_multiple_files = true;
option java_outer_classname = "AdminApiProto";
option java_package = "com.cs3.admin.v1beta1";
option objc_class_prefix = "CAX";
option php_namespace = "Cs3\\Admin\\V1Beta1";

import "cs3/identity/user/v1beta1/resources.proto";
import "cs3/rpc/v1beta1/status.proto";
import "cs3/types/v1beta1/types.proto";

// Admin API
//
// The Admin API is meant to be used to execute administrative tasks
// for users.
//
// The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
// NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
// "OPTIONAL" in this document are to be interpreted as described in
// RFC 2119.
//
// The following are global requirements that apply to all methods:
// Any method MUST return CODE_OK on a succesful operation.
// Any method MAY return NOT_IMPLEMENTED.
// Any method MAY return INTERNAL.
// Any method MAY return UNKNOWN.
// Any method MAY return UNAUTHENTICATED.
service AdminAPI {
// Deletes a users home directory.
// MUST return CODE_NOT_FOUND if the user does not exist
rpc DeleteHome(DeleteHomeRequest) returns (DeleteHomeResponse);
}

message DeleteHomeRequest {
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 1;
// REQUIRED.
// The user for which the action should be performed.
cs3.identity.user.v1beta1.UserId user_id = 2;
}

message DeleteHomeResponse {
// REQUIRED.
// The response status.
cs3.rpc.v1beta1.Status status = 1;
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 2;
}
123 changes: 123 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,29 @@ <h2>Table of Contents</h2>
<ul id="toc">


<li>
<a href="#cs3%2fadmin%2fv1beta1%2fadmin_api.proto">cs3/admin/v1beta1/admin_api.proto</a>
<ul>

<li>
<a href="#cs3.admin.v1beta1.DeleteHomeRequest"><span class="badge">M</span>DeleteHomeRequest</a>
</li>

<li>
<a href="#cs3.admin.v1beta1.DeleteHomeResponse"><span class="badge">M</span>DeleteHomeResponse</a>
</li>




<li>
<a href="#cs3.admin.v1beta1.AdminAPI"><span class="badge">S</span>AdminAPI</a>
</li>

</ul>
</li>


<li>
<a href="#cs3%2fgateway%2fv1beta1%2fgateway_api.proto">cs3/gateway/v1beta1/gateway_api.proto</a>
<ul>
Expand Down Expand Up @@ -1536,6 +1559,106 @@ <h2>Table of Contents</h2>



<div class="file-heading">
<h2 id="cs3/admin/v1beta1/admin_api.proto">cs3/admin/v1beta1/admin_api.proto</h2><a href="#title">Top</a>
</div>
<p></p>


<h3 id="cs3.admin.v1beta1.DeleteHomeRequest">DeleteHomeRequest</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>user_id</td>
<td><a href="#cs3.identity.user.v1beta1.UserId">cs3.identity.user.v1beta1.UserId</a></td>
<td></td>
<td><p>REQUIRED.
The user for which the action should be performed. </p></td>
</tr>

</tbody>
</table>





<h3 id="cs3.admin.v1beta1.DeleteHomeResponse">DeleteHomeResponse</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.admin.v1beta1.AdminAPI">AdminAPI</h3>
<p>Admin API</p><p>The Admin API is meant to be used to execute administrative tasks</p><p>for users.</p><p>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL</p><p>NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and</p><p>"OPTIONAL" in this document are to be interpreted as described in</p><p>RFC 2119.</p><p>The following are global requirements that apply to all methods:</p><p>Any method MUST return CODE_OK on a succesful operation.</p><p>Any method MAY return NOT_IMPLEMENTED.</p><p>Any method MAY return INTERNAL.</p><p>Any method MAY return UNKNOWN.</p><p>Any method MAY return UNAUTHENTICATED.</p>
<table class="enum-table">
<thead>
<tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
</thead>
<tbody>

<tr>
<td>DeleteHome</td>
<td><a href="#cs3.admin.v1beta1.DeleteHomeRequest">DeleteHomeRequest</a></td>
<td><a href="#cs3.admin.v1beta1.DeleteHomeResponse">DeleteHomeResponse</a></td>
<td><p>Deletes a users home directory.
MUST return CODE_NOT_FOUND if the user does not exist</p></td>
</tr>

</tbody>
</table>




<div class="file-heading">
<h2 id="cs3/gateway/v1beta1/gateway_api.proto">cs3/gateway/v1beta1/gateway_api.proto</h2><a href="#title">Top</a>
</div>
Expand Down

0 comments on commit f671ad5

Please sign in to comment.