diff --git a/cs3/gateway/v1beta1/gateway_api.proto b/cs3/gateway/v1beta1/gateway_api.proto index 6c3a6403..1d934309 100644 --- a/cs3/gateway/v1beta1/gateway_api.proto +++ b/cs3/gateway/v1beta1/gateway_api.proto @@ -153,6 +153,14 @@ service GatewayAPI { rpc UnsetArbitraryMetadata(cs3.storage.provider.v1beta1.UnsetArbitraryMetadataRequest) returns (cs3.storage.provider.v1beta1.UnsetArbitraryMetadataResponse); // Creates the home directory for a user. rpc CreateHome(cs3.storage.provider.v1beta1.CreateHomeRequest) returns (cs3.storage.provider.v1beta1.CreateHomeResponse); + // Creates a storage space. + rpc CreateStorageSpace(cs3.storage.provider.v1beta1.CreateStorageSpaceRequest) returns (cs3.storage.provider.v1beta1.CreateStorageSpaceResponse); + // Lists storage spaces. + rpc ListStorageSpaces(cs3.storage.provider.v1beta1.ListStorageSpacesRequest) returns (cs3.storage.provider.v1beta1.ListStorageSpacesResponse); + // Updates a storage space. + rpc UpdateStorageSpace(cs3.storage.provider.v1beta1.UpdateStorageSpaceRequest) returns (cs3.storage.provider.v1beta1.UpdateStorageSpaceResponse); + // Deletes a storage space. + rpc DeleteStorageSpace(cs3.storage.provider.v1beta1.DeleteStorageSpaceRequest) returns (cs3.storage.provider.v1beta1.DeleteStorageSpaceResponse); // *****************************************************************/ // ************************ APP PROVIDER ********************/ // *****************************************************************/ diff --git a/cs3/storage/provider/v1beta1/provider_api.proto b/cs3/storage/provider/v1beta1/provider_api.proto index f07b8b57..ce94cddc 100644 --- a/cs3/storage/provider/v1beta1/provider_api.proto +++ b/cs3/storage/provider/v1beta1/provider_api.proto @@ -28,6 +28,7 @@ option java_package = "com.cs3.storage.provider.v1beta1"; option objc_class_prefix = "CSP"; option php_namespace = "Cs3\\Storage\\Provider\\V1Beta1"; +import "cs3/identity/user/v1beta1/resources.proto"; import "cs3/rpc/v1beta1/status.proto"; import "cs3/storage/provider/v1beta1/resources.proto"; import "cs3/types/v1beta1/types.proto"; @@ -144,6 +145,14 @@ service ProviderAPI { rpc CreateHome(CreateHomeRequest) returns (CreateHomeResponse); // Gets the home path for the user. rpc GetHome(GetHomeRequest) returns (GetHomeResponse); + // Creates a storage space. + rpc CreateStorageSpace(CreateStorageSpaceRequest) returns (CreateStorageSpaceResponse); + // Lists storage spaces. + rpc ListStorageSpaces(ListStorageSpacesRequest) returns (ListStorageSpacesResponse); + // Updates a storage space. + rpc UpdateStorageSpace(UpdateStorageSpaceRequest) returns (UpdateStorageSpaceResponse); + // Deletes a storage space. + rpc DeleteStorageSpace(DeleteStorageSpaceRequest) returns (DeleteStorageSpaceResponse); } message GetHomeRequest { @@ -709,3 +718,105 @@ message CreateHomeResponse { // Opaque information. cs3.types.v1beta1.Opaque opaque = 2; } + +message CreateStorageSpaceRequest { + // OPTIONAL. + cs3.types.v1beta1.Opaque opaque = 1; + // REQUIRED. + cs3.identity.user.v1beta1.User owner = 2; + // OPTIONAL. + // Could be 'home', 'share', 'project', 'space'... + string type = 3; + // OPTIONAL. + // User readable name of the storage space. + string name = 4; + // OPTIONAL. + Quota quota = 5; +} + +message CreateStorageSpaceResponse { + // OPTIONAL. + // Opaque information. + cs3.types.v1beta1.Opaque opaque = 1; + // REQUIRED. + // The response status. + cs3.rpc.v1beta1.Status status = 2; + // REQUIRED. + // The created storage space. + StorageSpace storage_space = 3; +} + +message ListStorageSpacesRequest { + // OPTIONAL. + // Opaque information. + cs3.types.v1beta1.Opaque opaque = 1; + // Represents a filter to apply to the request. + message Filter { + // The filter to apply. + enum Type { + TYPE_INVALID = 0; + TYPE_NO = 1; + TYPE_ID = 2; + TYPE_OWNER = 3; + TYPE_SPACE_TYPE = 4; + } + // REQUIRED. + Type type = 1; + oneof term { + StorageSpaceId id = 2; + cs3.identity.user.v1beta1.UserId owner = 3; + string space_type = 4; + } + } + // OPTIONAL. + // The list of filters to apply if any. + repeated Filter filters = 2; +} + +message ListStorageSpacesResponse { + // OPTIONAL. + // Opaque information. + cs3.types.v1beta1.Opaque opaque = 1; + // REQUIRED. + // The response status. + cs3.rpc.v1beta1.Status status = 2; + // REQUIRED. + repeated StorageSpace storage_spaces = 3; +} + +message UpdateStorageSpaceRequest { + // OPTIONAL. + // Opaque information. + cs3.types.v1beta1.Opaque opaque = 1; + // REQUIRED. + StorageSpace storage_space = 2; +} + +message UpdateStorageSpaceResponse { + // OPTIONAL. + // Opaque information. + cs3.types.v1beta1.Opaque opaque = 1; + // REQUIRED. + // The response status. + cs3.rpc.v1beta1.Status status = 2; + // REQUIRED. + // The updated storage space. + StorageSpace storage_space = 3; +} + +message DeleteStorageSpaceRequest { + // OPTIONAL. + // Opaque information. + cs3.types.v1beta1.Opaque opaque = 1; + // REQUIRED. + StorageSpaceId id = 2; +} + +message DeleteStorageSpaceResponse { + // OPTIONAL. + // Opaque information. + cs3.types.v1beta1.Opaque opaque = 1; + // REQUIRED. + // The response status. + cs3.rpc.v1beta1.Status status = 2; +} diff --git a/cs3/storage/provider/v1beta1/resources.proto b/cs3/storage/provider/v1beta1/resources.proto index 8b8cf0cf..5fbdd198 100644 --- a/cs3/storage/provider/v1beta1/resources.proto +++ b/cs3/storage/provider/v1beta1/resources.proto @@ -355,3 +355,47 @@ message FileDownloadProtocol { // Tells to the gateway if the client should be exposed directly to the download_endpoint. bool expose = 4; } + +// Represents a storage space which could be a 'home', 'share' etc... +message StorageSpace { + // OPTIONAL. + // Opaque information. + cs3.types.v1beta1.Opaque opaque = 1; + // REQUIRED. + StorageSpaceId id = 2; + // OPTIONAL. + cs3.identity.user.v1beta1.User owner = 3; + // OPTIONAL. + // The root resource of the storage space. + ResourceId root = 4; + // OPTIONAL. + string name = 5; + // OPTIONAL. + Quota quota = 6; + // OPTIONAL. + // Could be 'home', 'share', 'project', 'space'... + string space_type = 7; + // OPTIONAL. + // Last modification time (mtime) of the root resource of this storage space. + cs3.types.v1beta1.Timestamp mtime = 8; +} + +// The id of a storage space. +message StorageSpaceId { + // REQUIRED. + // The internal storage space id. + string opaque_id = 1; +} + +// Represents a quota for a storage space. +message Quota { + // OPTIONAL. + // Opaque information. + cs3.types.v1beta1.Opaque opaque = 1; + // OPTIONAL. + // The bytes quota for the user. + uint64 quota_max_bytes = 2; + // OPTIONAL. + // The files quota for the user. + uint64 quota_max_files = 3; +} diff --git a/docs/index.html b/docs/index.html index 6cefdc13..253de53c 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1288,6 +1288,14 @@
Creates the home directory for a user. +
Creates the home directory for a user.
Creates a storage space.
Lists storage spaces.
Updates a storage space.
Deletes a storage space. *****************************************************************/ ************************ APP PROVIDER ********************/ @@ -10588,6 +10668,101 @@
Field | Type | Label | Description |
opaque | +cs3.types.v1beta1.Opaque | ++ | OPTIONAL. |
+
owner | +cs3.identity.user.v1beta1.User | ++ | REQUIRED. |
+
type | +string | ++ | OPTIONAL. +Could be 'home', 'share', 'project', 'space'... |
+
name | +string | ++ | OPTIONAL. +User readable name of the storage space. |
+
quota | +Quota | ++ | OPTIONAL. |
+
Field | Type | Label | Description |
opaque | +cs3.types.v1beta1.Opaque | ++ | OPTIONAL. +Opaque information. |
+
status | +cs3.rpc.v1beta1.Status | ++ | REQUIRED. +The response status. |
+
storage_space | +StorageSpace | ++ | REQUIRED. +The created storage space. |
+
Field | Type | Label | Description |
opaque | +cs3.types.v1beta1.Opaque | ++ | OPTIONAL. +Opaque information. |
+
id | +StorageSpaceId | ++ | REQUIRED. |
+
Field | Type | Label | Description |
opaque | +cs3.types.v1beta1.Opaque | ++ | OPTIONAL. +Opaque information. |
+
status | +cs3.rpc.v1beta1.Status | ++ | REQUIRED. +The response status. |
+
REQUIRED. -The source reference the resource is moved from.
REQUIRED. -The destination reference the resource is moved to.
OPTIONAL. +The list of filters to apply if any.
Represents a filter to apply to the request.
status | -cs3.rpc.v1beta1.Status | +type | +ListStorageSpacesRequest.Filter.Type | - | REQUIRED. -The response status. |
+ REQUIRED. |
opaque | -cs3.types.v1beta1.Opaque | +id | +StorageSpaceId | - | OPTIONAL. -Opaque information. |
+
|
+
owner | +cs3.identity.user.v1beta1.UserId | ++ |
|
+ |||
space_type | +string | ++ |
|
|||
ref | -Reference | +status | +cs3.rpc.v1beta1.Status | REQUIRED. -The reference to which the action should be performed. |
+The response status.
+ ||
storage_spaces | +StorageSpace | +repeated | +REQUIRED. |
Field | Type | Label | Description |
opaque | +cs3.types.v1beta1.Opaque | ++ | OPTIONAL. +Opaque information. |
+
source | +Reference | ++ | REQUIRED. +The source reference the resource is moved from. |
+
destination | +Reference | ++ | REQUIRED. +The destination reference the resource is moved to. |
+
Field | Type | Label | Description |
status | +cs3.rpc.v1beta1.Status | ++ | REQUIRED. +The response status. |
+
opaque | +cs3.types.v1beta1.Opaque | ++ | OPTIONAL. +Opaque information. |
+
Field | Type | Label | Description |
opaque | +cs3.types.v1beta1.Opaque | ++ | OPTIONAL. +Opaque information. |
+
ref | +Reference | ++ | REQUIRED. +The reference to which the action should be performed. |
+
Field | Type | Label | Description |
opaque | +cs3.types.v1beta1.Opaque | ++ | OPTIONAL. +Opaque information. |
+
storage_space | +StorageSpace | ++ | REQUIRED. |
+
Field | Type | Label | Description |
opaque | +cs3.types.v1beta1.Opaque | ++ | OPTIONAL. +Opaque information. |
+
status | +cs3.rpc.v1beta1.Status | ++ | REQUIRED. +The response status. |
+
storage_space | +StorageSpace | ++ | REQUIRED. +The updated storage space. |
+
The filter to apply.
+Name | Number | Description |
TYPE_INVALID | +0 | ++ |
TYPE_NO | +1 | ++ |
TYPE_ID | +2 | ++ |
TYPE_OWNER | +3 | ++ |
TYPE_SPACE_TYPE | +4 | ++ |
Gets the home path for the user.
Creates a storage space.
Lists storage spaces.
Updates a storage space.
Deletes a storage space.
Represents a quota for a storage space.
+ + +Field | Type | Label | Description |
opaque | +cs3.types.v1beta1.Opaque | ++ | OPTIONAL. +Opaque information. |
+
quota_max_bytes | +uint64 | ++ | OPTIONAL. +The bytes quota for the user. |
+
quota_max_files | +uint64 | ++ | OPTIONAL. +The files quota for the user. |
+
A recycle item represents the information
of a deleted resource.
@@ -13316,6 +13857,108 @@Represents a storage space which could be a 'home', 'share' etc...
+ + +Field | Type | Label | Description |
opaque | +cs3.types.v1beta1.Opaque | ++ | OPTIONAL. +Opaque information. |
+
id | +StorageSpaceId | ++ | REQUIRED. |
+
owner | +cs3.identity.user.v1beta1.User | ++ | OPTIONAL. |
+
root | +ResourceId | ++ | OPTIONAL. +The root resource of the storage space. |
+
name | +string | ++ | OPTIONAL. |
+
quota | +Quota | ++ | OPTIONAL. |
+
space_type | +string | ++ | OPTIONAL. +Could be 'home', 'share', 'project', 'space'... |
+
mtime | +cs3.types.v1beta1.Timestamp | ++ | OPTIONAL. +Last modification time (mtime) of the root resource of this storage space. |
+
The id of a storage space.
+ + +Field | Type | Label | Description |
opaque_id | +string | ++ | REQUIRED. +The internal storage space id. |
+