Commit graph

92 commits

Author SHA1 Message Date
Stanislav Bogatyrev
a8c1779690 [#81] Clarify that attribute names must be unique
All types of attribute keys must be unique and can't be repeated in the same
entity.

- Containers with duplicated attribute keys must not be accepted by InnerRing on
  creation.
- Nodes with duplicated attribute keys can't be accepted to NetMap by InnerRing
- Objects with duplicated attribute keys must be considered invalid and not
  accepted in PUT operations

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-12-11 10:19:46 +03:00
Alex Vanin
75dd1261e3 Add raw flag in object.GetRangeRequest
Raw flag used to get range of physically stored objects and
ignoring split objects. In case of split object node should
return SplitInfo message.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-10 10:43:42 +03:00
Alex Vanin
7f26542813 Add split_info field in object.GetRangeResponse body
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-10 10:43:42 +03:00
Alex Vanin
7995020a9d Add split_info field in object.HeadResponse body
Head operation returns SplitInfo structure if request has
raw flag and ID of virtual object.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-10 10:43:42 +03:00
Alex Vanin
a5a39257fc Add split_info field in object.GetResponse body
SplitInfo structure from split_info field contains meta information
to assembly the object that has been split into parts.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-10 10:43:42 +03:00
Stanislav Bogatyrev
289a6366fa [#51] Define Tombstone type and return it's address on object delete
- Define payload structure for Tombstone object type.
- Return address of the created TS on object delete. Useful for testing

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-12-09 19:38:16 +03:00
Stanislav Bogatyrev
b930782fd3 [#84] Clarify various types encoding formats
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-12-09 16:55:02 +03:00
Stanislav Bogatyrev
063ec430d1 [#86] Clarify that Attributes can't have empty values
In case there is a need to set flag-like attributes, the value should be set to
something like `true` or `1`.

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-12-09 16:51:21 +03:00
Stanislav Bogatyrev
29c9e1d68b typo fix
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-11-25 16:37:08 +03:00
Stanislav Bogatyrev
73143ac362 Add split_id search attribute and remove childfree
After adding `split_id` there is no need to have $Object:CHILDFREE.

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-11-25 13:43:20 +03:00
Stanislav Bogatyrev
71469da602 Typo fixes
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-11-25 13:43:20 +03:00
Stanislav Bogatyrev
55c04e485e Add header.split.split_id header to object
In some cases like nspcc-dev/neofs-node#167 there is no simple way to identify
where does the object part belongs to. Adding `split_id` as the required field
will simplify split object processing.

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-11-17 11:03:33 +03:00
Stanislav Bogatyrev
3cdde6492b Mention object split limitation by type
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-11-10 09:26:11 +03:00
Stanislav Bogatyrev
2613670553 [nspcc-dev/neofs-node#151] Clarify $Object:ROOT filter description
* It's expected by app developers that ROOT filter will return the list of objects
created by user, without supplementary objects like split object parts,
tombstones and storage groups.

* Rename LEAF to PHY as it's purpose it to return physically existing objects.

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-11-09 19:00:39 +03:00
Stanislav Bogatyrev
9a319905be [#87] Add object ID key in extended ACL filters
Extended ACL description lacks `objectID` key in filters. It's useful to control
access to specific object.

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-11-09 17:33:19 +03:00
Alex Vanin
5916eb1170 [#80] Clarify well-known object filters parent and childfree
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-23 18:17:28 +03:00
Stanislav Bogatyrev
b063e5b910 Rename object search and ACL filters fields for consistency
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-10-23 16:27:34 +03:00
Stanislav Bogatyrev
f1acb8c14f Typo fix
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-10-23 15:29:37 +03:00
Stanislav Bogatyrev
8056035132 Clarify object search filter header name usage
Related: nspcc-dev/neofs-spec#12

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-10-23 15:29:37 +03:00
Stanislav Bogatyrev
31e1801c4a Add more well-known attributes
Resolves nspcc-dev/neofs-api-go#172

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-10-21 19:37:50 +03:00
Stanislav Bogatyrev
a1d9527f34 [#73] Add JSON field names to object package
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-10-19 14:49:14 +03:00
Evgenii Stratonikov
4f01f4b902 [#73] Add json field names to oblect struct
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2020-10-19 14:49:14 +03:00
Stanislav Bogatyrev
27f4b1ad63 Update object package docs
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-10-16 12:37:19 +03:00
Stanislav Bogatyrev
c793503167 Add well-known attributes for objects
Adding the list of currently well-known object attributes. More to come later.

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-10-16 12:37:19 +03:00
Stanislav Bogatyrev
6014665fa6 [#67] Typo fixes
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-09-04 15:50:31 +03:00
Alex Vanin
4aea595cc6 [#67] Use tuple of header and signature in object head response
Object.Head method returns either full header or short header.
Since it can't return anything else, signature must be paired
with full header in explicit tuple message.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-04 13:27:05 +03:00
Stanislav Bogatyrev
a07a518a1e [#66] object: Add object_id signature to Head response
Object ID signature is needed to check Header authenticity.

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-09-03 16:10:05 +03:00
Stanislav Bogatyrev
c8054c5daa [#58] netmap: Simplify Placement Policy
Proposed protobuf format for Placement Policy simplifies direct editing in
visual editors and import/export from other formats like JSON.

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-09-01 21:15:09 +03:00
Stanislav Bogatyrev
fc170f56bf [#57] Merge service and session packages
Merging session and service packages to increase clarity and reduce
cross-dependencies.

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-08-20 10:33:49 +03:00
Stanislav Bogatyrev
762c9762ef [#56] Fix typos and regenerate docs
Sorry =)

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-08-18 18:41:44 +03:00
Stanislav Bogatyrev
526792324d [#56] Add separate checksum type
NeoFS uses different checksum algorithms. It looks like we need to explicitly
define what algorithm is used in each particular case.

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-08-18 18:36:31 +03:00
Stanislav Bogatyrev
e5f78eb927 Move SessionToken to session package
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-08-18 18:31:36 +03:00
Stanislav Bogatyrev
7d72061fb3 Move BearerToken type to acl package
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-08-18 18:31:36 +03:00
Stanislav Bogatyrev
54778a86ed Move Version to refs
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-08-18 18:31:36 +03:00
Stanislav Bogatyrev
13a80df882 Use common signature type
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-08-18 15:04:15 +03:00
Stanislav Bogatyrev
a78b8a1ea5 Move all service types to types.proto
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-08-18 15:04:15 +03:00
Stanislav Bogatyrev
4e908a17b1 [#50] Add version fields where it makes sense
Some pieces of data (container, object, etc) may be stored for a long time and
there will be a need in the future to understand which obscure format from the
past was used to create it.

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-08-17 12:12:30 +03:00
Stanislav Bogatyrev
7555e166b2 [#49] Minor reformat
- Trying to move enums to the package level
- Trying to keep all definitions in types.proto

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-08-17 12:12:16 +03:00
Stanislav Bogatyrev
e63a482529 [#48] Add grpc suffix to go_package option
To simplify adding more transport level protocols to neofs-api-go in future, we
need to separate currently default gRPC.

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-08-17 12:11:38 +03:00
Stanislav Bogatyrev
42e35fefff [#45] Fix linter errors
- Changed package names adding version
- Added documentation descriptions (sometimes useless) for all fields
- Changed enum format
- Made SessionToken and BearerToken field names more clear

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-08-13 22:57:00 +03:00
Stanislav Bogatyrev
cfd24944a4 [#38] Typo fixes
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-08-11 21:36:03 +03:00
Stanislav Bogatyrev
818ec7f0dc [#38] Change ObjectID format from UUID to Hash
NeoFS Object are now Content-addressed. It means the Object's address depends on
it's content. ObjectID is now calculated as hash of Header, which contains a
hash of payload. If either if Object's payload of Headers change, the ID will
also change.

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-08-11 16:30:39 +03:00
Alex Vanin
60690a0f0b [#37] Add body message to object requests
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-08-11 12:37:06 +03:00
Stanislav Bogatyrev
327c476ecf [#41] Reindent according to Google Style Guide
Just a minor change to follow 2-space indent declared in Google Style Guide

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-08-11 12:08:37 +03:00
Leonard Lyubich
b088391294 [#40] service: Rename Token to SessionToken
Rename Token message to SessionToken to clarify its purpose.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-11 11:50:36 +03:00
Stanislav Bogatyrev
e75ef53793 [#32] Rename fields according to Protobuf Style Guide
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-08-07 14:36:15 +03:00
Leonard Lyubich
05a885e142 object: Tidy up the format
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 23:45:50 +03:00
Leonard Lyubich
0ca83fcef6 service: Tidy up the format
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 23:45:50 +03:00
Leonard Lyubich
23f571f76f object: Remove response meta header
This commit removes ResponseMetaHeader from the repository since it is not
verifiable and its purpose is questionable. If needed, it can be added to
queries without losing compatibility with the API version.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 23:45:50 +03:00
Leonard Lyubich
3518fc42bd object: Replace Raw flag
In previous version of the format RequestMetaHeader, which is included in
all requests, contained the boolean flag Raw. However, this option was
processed only in object.Head and object.Get rpc. Therefore, this commit
strips the field from the request meta header and adds it to the mentioned
requests.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-08-06 23:45:50 +03:00