Implement `String` / `FromString` method pair in all levels of enum
definitions. From now `String()` returns canonical protojson-compatible
values.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Document field values of instance constructed via `NewNodeInfo` and `NewNodeAttribute`.
Assert the values in corresponding unit test.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Document that `NodeAttribute.ToV2` and `NodeInfo.ToV2`
method return `nil` when called on `nil`. Document that
`NodeAttributeFromV2` and `NodeInfoFromV2` functions
return `nil` when called on `nil`. Write corresponding
unit tests.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>