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>
Extended ACL filters and object search filters use strings to specify
well-known object headers, such as owner id, object id, etc. To unify
these constant they've been moved into object package, because they
specifying object related headers.
This should be noted in nspcc-dev/neofs-spec#12
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
In previous implementation RawObject constructor initialized internal v2
Object structure recursively so that further you can directly set the values
of nested fields. This caused the object created by constructor New to be
different from the object created from the empty object v2.
Remove recursive initialization of v2 Object from New and NewRaw
constructors. Make setters to initialize nested structures on demand.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Remove nil if-statement from IDFromV2 function to which avoids checking the
correctness of the identifier format. From now IDFromV2 returns format error
on nil argument.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Implement method to get address of the object. Implement method to copy the
object w/o payload. Implement function of object deserialization.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Define Object type that represents the immutable NeoFS object. Define
RawObject type that provides interface for convenient construction of NeoFS
object.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>