There is a need to provide convenient function which allows to slice
user data into objects to be stored in NeoFS. The main challenge is to
produce objects compliant with the format described in the NeoFS
Specification.
Add `object/slicer` package. Export `Slicer` type which performs data
slicing.
Refs #342.
Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
Return `error` from all `ReadFromV2` methods in order to support
backward compatibility if message will be extended with some formatted
field.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Remove `signature` and `util/signature` packages. Re-implement their
functionality in new `crypto` package. Generalize the approach of
digital signature computation and verification by adding `Signer` and
`PublicKey` primitives similar to standard `crypto` package. Support
already exising in protocol signature schemes.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Do not return pointers from getters. Do not pass pointers to the methods
that does not modify the checksum. Add `Empty` method.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
All NeoFS object must have at least container and owner identifiers.
Add `InitCreation` function which write all required fields to the
object instance. Extend `Object` type docs with all the constructors.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>