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 @@

Table of Contents

MCreateReferenceResponse +
  • + MCreateStorageSpaceRequest +
  • + +
  • + MCreateStorageSpaceResponse +
  • +
  • MCreateSymlinkRequest
  • @@ -1304,6 +1312,14 @@

    Table of Contents

    MDeleteResponse +
  • + MDeleteStorageSpaceRequest +
  • + +
  • + MDeleteStorageSpaceResponse +
  • +
  • MGetHomeRequest
  • @@ -1392,6 +1408,18 @@

    Table of Contents

    MListRecycleStreamResponse +
  • + MListStorageSpacesRequest +
  • + +
  • + MListStorageSpacesRequest.Filter +
  • + +
  • + MListStorageSpacesResponse +
  • +
  • MMoveRequest
  • @@ -1464,6 +1492,18 @@

    Table of Contents

    MUpdateGrantResponse +
  • + MUpdateStorageSpaceRequest +
  • + +
  • + MUpdateStorageSpaceResponse +
  • + + +
  • + EListStorageSpacesRequest.Filter.Type +
  • @@ -1511,6 +1551,10 @@

    Table of Contents

    MGrantee +
  • + MQuota +
  • +
  • MRecycleItem
  • @@ -1539,6 +1583,14 @@

    Table of Contents

    MResourcePermissions +
  • + MStorageSpace +
  • + +
  • + MStorageSpaceId +
  • +
  • EGranteeType @@ -2378,7 +2430,35 @@

    GatewayAPI

    CreateHome .cs3.storage.provider.v1beta1.CreateHomeRequest .cs3.storage.provider.v1beta1.CreateHomeResponse -

    Creates the home directory for a user. +

    Creates the home directory for a user.

    + + + + CreateStorageSpace + .cs3.storage.provider.v1beta1.CreateStorageSpaceRequest + .cs3.storage.provider.v1beta1.CreateStorageSpaceResponse +

    Creates a storage space.

    + + + + ListStorageSpaces + .cs3.storage.provider.v1beta1.ListStorageSpacesRequest + .cs3.storage.provider.v1beta1.ListStorageSpacesResponse +

    Lists storage spaces.

    + + + + UpdateStorageSpace + .cs3.storage.provider.v1beta1.UpdateStorageSpaceRequest + .cs3.storage.provider.v1beta1.UpdateStorageSpaceResponse +

    Updates a storage space.

    + + + + DeleteStorageSpace + .cs3.storage.provider.v1beta1.DeleteStorageSpaceRequest + .cs3.storage.provider.v1beta1.DeleteStorageSpaceResponse +

    Deletes a storage space. *****************************************************************/ ************************ APP PROVIDER ********************/ @@ -10588,6 +10668,101 @@

    CreateReferenceRes +

    CreateStorageSpaceRequest

    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    opaquecs3.types.v1beta1.Opaque

    OPTIONAL.

    ownercs3.identity.user.v1beta1.User

    REQUIRED.

    typestring

    OPTIONAL. +Could be 'home', 'share', 'project', 'space'...

    namestring

    OPTIONAL. +User readable name of the storage space.

    quotaQuota

    OPTIONAL.

    + + + + + +

    CreateStorageSpaceResponse

    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    opaquecs3.types.v1beta1.Opaque

    OPTIONAL. +Opaque information.

    statuscs3.rpc.v1beta1.Status

    REQUIRED. +The response status.

    storage_spaceStorageSpace

    REQUIRED. +The created storage space.

    + + + + +

    CreateSymlinkRequest

    @@ -10729,6 +10904,71 @@

    DeleteResponse

    +

    DeleteStorageSpaceRequest

    +

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    opaquecs3.types.v1beta1.Opaque

    OPTIONAL. +Opaque information.

    idStorageSpaceId

    REQUIRED.

    + + + + + +

    DeleteStorageSpaceResponse

    +

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    opaquecs3.types.v1beta1.Opaque

    OPTIONAL. +Opaque information.

    statuscs3.rpc.v1beta1.Status

    REQUIRED. +The response status.

    + + + + +

    GetHomeRequest

    @@ -11578,7 +11818,7 @@

    ListRecycleStrea -

    MoveRequest

    +

    ListStorageSpacesRequest

    @@ -11597,19 +11837,11 @@

    MoveRequest

    - source - Reference - -

    REQUIRED. -The source reference the resource is moved from.

    - - - - destination - Reference - -

    REQUIRED. -The destination reference the resource is moved to.

    + filters + ListStorageSpacesRequest.Filter + repeated +

    OPTIONAL. +The list of filters to apply if any.

    @@ -11619,8 +11851,8 @@

    MoveRequest

    -

    MoveResponse

    -

    +

    ListStorageSpacesRequest.Filter

    +

    Represents a filter to apply to the request.

    @@ -11630,19 +11862,31 @@

    MoveResponse

    - - + + - + - - + + - + + + + + + + + + + + + + + + @@ -11652,7 +11896,7 @@

    MoveResponse

    -

    PurgeRecycleRequest

    +

    ListStorageSpacesResponse

    @@ -11671,11 +11915,18 @@

    PurgeRecycleRequest

    - - + + +The response status.

    + + + + + + + @@ -11685,7 +11936,114 @@

    PurgeRecycleRequestPurgeRecycleResponse

    +

    MoveRequest

    +

    + + +
    statuscs3.rpc.v1beta1.StatustypeListStorageSpacesRequest.Filter.Type

    REQUIRED. -The response status.

    REQUIRED.

    opaquecs3.types.v1beta1.OpaqueidStorageSpaceId

    OPTIONAL. -Opaque information.

    ownercs3.identity.user.v1beta1.UserId

    space_typestring

    refReferencestatuscs3.rpc.v1beta1.Status

    REQUIRED. -The reference to which the action should be performed.

    storage_spacesStorageSpacerepeated

    REQUIRED.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    opaquecs3.types.v1beta1.Opaque

    OPTIONAL. +Opaque information.

    sourceReference

    REQUIRED. +The source reference the resource is moved from.

    destinationReference

    REQUIRED. +The destination reference the resource is moved to.

    + + + + + +

    MoveResponse

    +

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    statuscs3.rpc.v1beta1.Status

    REQUIRED. +The response status.

    opaquecs3.types.v1beta1.Opaque

    OPTIONAL. +Opaque information.

    + + + + + +

    PurgeRecycleRequest

    +

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    opaquecs3.types.v1beta1.Opaque

    OPTIONAL. +Opaque information.

    refReference

    REQUIRED. +The reference to which the action should be performed.

    + + + + + +

    PurgeRecycleResponse

    @@ -12257,7 +12615,121 @@

    UpdateGrantResponseUpdateStorageSpaceRequest

    +

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    opaquecs3.types.v1beta1.Opaque

    OPTIONAL. +Opaque information.

    storage_spaceStorageSpace

    REQUIRED.

    + + + + +

    UpdateStorageSpaceResponse

    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    opaquecs3.types.v1beta1.Opaque

    OPTIONAL. +Opaque information.

    statuscs3.rpc.v1beta1.Status

    REQUIRED. +The response status.

    storage_spaceStorageSpace

    REQUIRED. +The updated storage space.

    + + + + + + + +

    ListStorageSpacesRequest.Filter.Type

    +

    The filter to apply.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameNumberDescription
    TYPE_INVALID0

    TYPE_NO1

    TYPE_ID2

    TYPE_OWNER3

    TYPE_SPACE_TYPE4

    @@ -12496,6 +12968,34 @@

    ProviderAPI

    Gets the home path for the user.

    + + CreateStorageSpace + CreateStorageSpaceRequest + CreateStorageSpaceResponse +

    Creates a storage space.

    + + + + ListStorageSpaces + ListStorageSpacesRequest + ListStorageSpacesResponse +

    Lists storage spaces.

    + + + + UpdateStorageSpace + UpdateStorageSpaceRequest + UpdateStorageSpaceResponse +

    Updates a storage space.

    + + + + DeleteStorageSpace + DeleteStorageSpaceRequest + DeleteStorageSpaceResponse +

    Deletes a storage space.

    + + @@ -12828,6 +13328,47 @@

    Grantee

    +

    Quota

    +

    Represents a quota for a storage space.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    opaquecs3.types.v1beta1.Opaque

    OPTIONAL. +Opaque information.

    quota_max_bytesuint64

    OPTIONAL. +The bytes quota for the user.

    quota_max_filesuint64

    OPTIONAL. +The files quota for the user.

    + + + + +

    RecycleItem

    A recycle item represents the information

    of a deleted resource.

    @@ -13316,6 +13857,108 @@

    ResourcePermissionsStorageSpace

    +

    Represents a storage space which could be a 'home', 'share' etc...

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    opaquecs3.types.v1beta1.Opaque

    OPTIONAL. +Opaque information.

    idStorageSpaceId

    REQUIRED.

    ownercs3.identity.user.v1beta1.User

    OPTIONAL.

    rootResourceId

    OPTIONAL. +The root resource of the storage space.

    namestring

    OPTIONAL.

    quotaQuota

    OPTIONAL.

    space_typestring

    OPTIONAL. +Could be 'home', 'share', 'project', 'space'...

    mtimecs3.types.v1beta1.Timestamp

    OPTIONAL. +Last modification time (mtime) of the root resource of this storage space.

    + + + + + +

    StorageSpaceId

    +

    The id of a storage space.

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    opaque_idstring

    REQUIRED. +The internal storage space id.

    + + + + +

    GranteeType