Commit graph

70 commits

Author SHA1 Message Date
Alex Vanin
e39a1fd949 pkg/object: Add content type constant
Specification defined one more well-known object
attribute `Content-Type`.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-15 13:27:28 +03:00
Leonard Lyubich
e782531f25 [#255] pkg/object: Implement json.Marshaler/Unmarshaler on SearchFilters
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-02-11 15:04:13 +03:00
Leonard Lyubich
ebff07aaf2 [#254] object: Support new values of search match type
Support STRING_NOT_EQUAL and NOT_PRESENT match types
of object search filters.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-02-11 15:04:13 +03:00
Leonard Lyubich
e9ae408c3a [#254] pkg/object: Rewrite unit test of MatchType enum
Avoid direct usage of naming constants where it is not necessary.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-02-11 15:04:13 +03:00
Leonard Lyubich
f0ebe80a78 [#231] object/search: Implement method to add search filter by type
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-25 16:20:26 +03:00
Leonard Lyubich
53e2756762 [#231] object: Implement string encode/decode methods on Type
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-25 16:20:26 +03:00
Leonard Lyubich
803c91b3eb [#226] sdk/client: Add tombstone address to the return of DeleteObject
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-10 18:26:23 +03:00
Leonard Lyubich
c064760f5d [#226] sdk/object: Implement Tombstone type with field access and encoding
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-10 18:26:23 +03:00
Alex Vanin
1fe0307711 [#223] pkg/object: Work with SplitInfoError via pointer
Closes #221

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-03 18:07:42 +03:00
Alex Vanin
b683dbe7e6 [#218] pkg/object: Add marshal operations for SplitInfo
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-03 16:09:38 +03:00
Alex Vanin
e11b1728be [#218] pkg/object: Define custom error for SplitInfo
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-03 16:09:38 +03:00
Alex Vanin
1fdeca84e1 [#218] Support SplitInfo structure
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-12-03 16:09:38 +03:00
Alex Vanin
2a94fdc5e7 [#209] Support nil value in SplitID
SplitID is not set on non-split and virtual
objects, so we should support this state in
library.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-26 13:26:34 +03:00
Alex Vanin
3d08d8140f [#209] object: Support splitID search attribute
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-26 11:56:30 +03:00
Alex Vanin
79c76e87e4 [#209] object: Remove childfree search attribute
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-26 11:56:30 +03:00
Alex Vanin
6b0bd42f25 [#209] pkg/object: Support splitID field in SDK library
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-26 11:56:30 +03:00
Leonard Lyubich
20ede88fe7 [#204] sdk/object: Add SearchFilters method to filter by object ID
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-20 10:41:17 +03:00
Leonard Lyubich
1ff8b3fd94 [#199] sdk/object: Correct linter's remarks
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-16 18:51:14 +03:00
Leonard Lyubich
79f72e10c9 [#199] sdk: Refactor string parse errors
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-16 18:51:14 +03:00
Leonard Lyubich
5f5e5ac5dd [#197] sdk/object: Rename getters of Attribute and Object types
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-16 11:52:21 +03:00
Leonard Lyubich
67bcf6eb4d [#197] sdk/object: Rename getters of Address type
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-16 11:52:21 +03:00
Leonard Lyubich
2afc684313 [#197] sdk: Rename getters of Signature type
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-16 11:52:21 +03:00
Alex Vanin
f886d75560 [#168] pkg/object: Fix lint error on attribute receiver
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
7289ff6c64 [#168] refs: Implement binary/JSON encoders/decoders on ObjectID
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
4ce751f13c [#168] refs: Implement binary/JSON encoders/decoders on Address
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
9325e22871 [#168] object: Implement binary/JSON encoders/decoders on Object
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
0caff85fb7 [#168] object: Implement binary/JSON encoders/decoders on Attribute
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Alex Vanin
abed8a9156 [#191] v2: Add ObjectID filters for ACL and Object packages
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-11 10:35:34 +03:00
Alex Vanin
fe48e3ab5b [#191] pkg/object: Use root and phy filters as flags
Inverted values for `root` and `phy` filters now are not supported.
Therefore these filters works like flags. It either presented in
search query or not.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-11 10:35:34 +03:00
Alex Vanin
91eade02cd [#191] v2/object: Rename leaf filter to phy
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-11 10:35:34 +03:00
Leonard Lyubich
e4111ff3e7 [#190] sdk/object: Implement AddParentIDFilter method on SearchFilters
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-06 09:25:40 +03:00
Leonard Lyubich
ac38d13f04 [#182] sdk/object: Refactor a way to add filters by properties
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-10-28 14:11:49 +03:00
Leonard Lyubich
88c8c08c6b [#182] sdk/object: Implement methods for adding object search filters
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-10-28 14:11:49 +03:00
Leonard Lyubich
dc9fcd5d98 [#182] Rename methods to match updated field names
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-10-28 14:11:49 +03:00
Leonard Lyubich
ad0b01e892 [#172] Improve the readability of named attribute constants
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-10-22 19:15:45 +03:00
Leonard Lyubich
5494d3417f [#172] sdk/object: Define well-known application attributes
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-10-22 19:15:45 +03:00
Evgeniy Kulikov
20273357f6 [#147] Work around object package
- implement Stringer interface and Parse method for object.Address
- increase test coverage

closes #147

Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-10-15 11:05:37 +03:00
Evgeniy Kulikov
f5b442fe3b [#147] Work around object package
- implement Stringer interface and Parse method for object.ID
- increase test coverage

closes #147

Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
2020-10-15 11:05:37 +03:00
Leonard Lyubich
cf70026c7e [#164] sdk/container: Implement Equal method on ID
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-10-01 10:06:30 +03:00
Leonard Lyubich
1305bc750e [#164] sdk/object: Add HasParent method
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-10-01 10:06:30 +03:00
Leonard Lyubich
2a2e4d8577 [#164] sdk/object: Implement method to reset relation fields
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-10-01 10:06:30 +03:00
Leonard Lyubich
f3bddc2ba5 [#164] sdk/object: Define filters to search virtual objects
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-10-01 10:06:30 +03:00
Leonard Lyubich
09e6093e64 [#164] sdk/object: Define filters to search root objects
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-10-01 10:06:30 +03:00
Leonard Lyubich
9799e5d48c [#164] sdk/object: Return nil parent if parent fields are empty
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-10-01 10:06:30 +03:00
Leonard Lyubich
ae81f4584e [#164] sdk/object: Add parent ID getter and setter
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-10-01 10:06:30 +03:00
Leonard Lyubich
420d956062 [#162] sdk/object: Detach header verification functions
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-29 15:26:41 +03:00
Leonard Lyubich
d19e5418da [#159] sdk: Define object range in object pkg
Define Range type in object package. Replace Range in client package with
the new one.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-25 15:58:24 +03:00
Leonard Lyubich
14fa89b819 [#155] sdk/object: Add Object to RawObject converter
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-22 18:07:14 +03:00
Leonard Lyubich
cecdeeac73 [#155] sdk/object: Add CutPayload method to RawObject
Add CutPayload method that returns RawObject's copy with untethered empty
payload. Changing the result payload doesn't affect source object. Changing
the other fields affects source object.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-22 18:07:14 +03:00
Leonard Lyubich
dbb5102c02 [#155] sdk/object: Add object type getter/setter
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-22 18:07:14 +03:00