From 1c683c757807b8dd3df4570035d456a21f3865c2 Mon Sep 17 00:00:00 2001 From: Stanislav Bogatyrev Date: Mon, 21 Feb 2022 12:47:21 +0300 Subject: [PATCH] [#194] Move Lock payload description to definition Signed-off-by: Stanislav Bogatyrev --- lock/types.proto | 7 +++++-- object/types.proto | 9 ++------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/lock/types.proto b/lock/types.proto index 30a9607..fea7fe6 100644 --- a/lock/types.proto +++ b/lock/types.proto @@ -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"]; } diff --git a/object/types.proto b/object/types.proto index dc0bb69..2980b39 100644 --- a/object/types.proto +++ b/object/types.proto @@ -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"];