Commit graph

3 commits

Author SHA1 Message Date
Pavel Karpy
19cf3c2d0b [#302] pkg/netmap: Document default values set in NewNetworkInfo
Document field values of instance constructed via `NewNetworkInfo`.
Assert the values in corresponding unit test.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-06-09 17:23:35 +03:00
Pavel Karpy
6142a352da [#302] pkg/netmap: Convert nil NetworkInfo to nil message
Document that `NetworkInfo.ToV2` method return `nil`
when called on `nil`. Document that `NewNetworkInfoFromV2`
function return `nil` when called on `nil`. Write
corresponding unit tests.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-06-09 17:23:35 +03:00
Leonard Lyubich
f6268339d0 [#259] pkg/netmap: Implement v2-compatible NetworkInfo type
Define NetworkInfo structure. Implement constructors, fields getters and
setters, binary and JSON encoding methods.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-02-19 16:25:53 +03:00