Skip to content

Commit

Permalink
[#194] Move Lock payload description to definition
Browse files Browse the repository at this point in the history
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
  • Loading branch information
Stanislav Bogatyrev authored and cthulhu-rider committed Feb 22, 2022
1 parent d6bf645 commit 1c683c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
7 changes: 5 additions & 2 deletions lock/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ option csharp_namespace = "Neo.FileStorage.API.Lock";

import "refs/types.proto";

// Lock keeps record of objects that are locked.
// Lock objects protects a list of objects from being deleted. Lifetime of the
// lock object is limited similar to regular objects in
// `__NEOFS__EXPIRATION_EPOCH` attribute.
message Lock {
// List of objects to be locked.
// List of objects to lock. Must not be empty or carry empty IDs.
// All members must be of the `REGULAR` type.
repeated neo.fs.v2.refs.ObjectID members = 1 [json_name = "members"];
}
9 changes: 2 additions & 7 deletions object/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,8 @@ message Header {
// `ObjectID` will change if header or payload changes. It's calculated as a
// hash of header field, which contains hash of object's payload.
//
// Payload format depends on object type specified in the header:
// * **LOCK** \
// Must be encoded message of type `Lock` in Protocol Buffers binary format
// with direct field order. Member list must no be empty or carry empty IDs.
// All members must regular objects (`REGULAR` type). Lifetime of the lock
// object is limited similar to regular objects in `__NEOFS__EXPIRATION_EPOCH`
// attribute.
// For non-regular object types payload format depends on object type specified
// in the header.
message Object {
// Object's unique identifier.
neo.fs.v2.refs.ObjectID object_id = 1 [json_name = "objectID"];
Expand Down

0 comments on commit 1c683c7

Please sign in to comment.