Document that `ID.ToV2` method returns
`nil` when is called on `nil`. Document
that `NewFromV2` method returns
`nil` when is called on `nil`. Add
corresponding unit test.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Remove usage of deprecated of `container.ID` and `token.SessionToken` code
elements. Replace using of custom message generators with the ones provided
by packages. Replace string comparison with `Equal` method call.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
In order to prevent potential cross imports, container ID should be defined
in a separate package as a base type. A similar approach was used in the
NeoFS API design.
Create `pkg/container/id` package and replace container ID implementation to
it. Related API in `container` package is deprecated from now.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>