Move all memory allocation and field settings
in `Generate...(empty bool)` functions behind
`if !empty` check. Do not create empty slices
if `empty == true`.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Define `ContainerSessionContext` structure, implement getters / setters,
JSON and binary encoders, gRPC converters. Support new type of context in
SessionTokenBody message. Add test message generator and cover methods with
unit tests.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Implement `message.Message` interface on all structures and use new methods
for conversion instead of functions. make `Unmarshal` and JSON methods to
use encoding functions from `message` library. Remove all per-service
clients and implement `rpc` library of the functions which execute NeoFS API
RPC through new RPC client. Remove no longer used gRPC per-service clients.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>