Commit graph

9 commits

Author SHA1 Message Date
Leonard Lyubich
616b4b71a1 [#310] *: Implement string converters for enumerations
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>
2021-06-23 10:24:32 +03:00
Pavel Karpy
bf0d106e54 [#302] pkg/checksum: Document default values set in NewChecksum
Document field values of instance constructed via `NewChecksum`.
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
35b6629e1c [#302] pkg/checksum: Convert nil Checksum to nil message
Document that `Checksum.ToV2` method return `nil`
when called on `nil`. Document that `NewChecksumFromV2`
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
Evgenii Stratonikov
9ddfcdfbba [#277] go.mod: remove pkg/errors
Use stdlib `errors` instead.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-05-19 11:14:56 +03:00
Leonard Lyubich
0f04087543 [#230] pkg: Implement string encode/decode methods on Checksum
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-25 16:20:26 +03:00
Leonard Lyubich
9f0bc50e53 [#197] sdk: Rename getters of Checksum type
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-16 11:52:21 +03:00
Leonard Lyubich
93df2fd765 [#168] refs: Implement binary/JSON encoders/decoders on Checksum
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-11-13 18:07:26 +03:00
Leonard Lyubich
5473b4ef95 [#140] sdk: Implement checksum comparison function
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-18 10:45:11 +03:00
Leonard Lyubich
5902f96f3e [#140] sdk: Define checksum type
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-18 10:45:11 +03:00