Commit graph

1134 commits

Author SHA1 Message Date
Pavel Karpy
2fb67d99d3 [#302] pkg/object: Document default values set in NewTombstone
Document field values of instance constructed via `NewTombstone`.
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
753402c336 [#302] pkg/object: Convert nil Tombstone to nil message
Document that `NewTombstoneFromV2` 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
Pavel Karpy
dde721ea9f [#302] pkg/object: Document default values set in NewSplitInfo
Document field values of instance constructed via `NewSplitInfo`.
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
5cbdef1e46 [#302] pkg/object: Convert nil SplitInfo to nil message
Document that `SplitInfo.ToV2` method return `nil`
when called on `nil`. Document that `NewSplitInfoFromV2`
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
Pavel Karpy
d443904e43 [#302] pkg/object: Document default values set in NewRange
Document field values of instance constructed via `NewRange`.
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
4e40f195bc [#302] pkg/object: Convert nil Range to nil message
Document that `Range.ToV2` method return `nil`
when called on `nil`. Document that `NewRangeFromV2`
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
Pavel Karpy
6c12b4dfb6 [#302] pkg/object: Document default values set in NewID
Document field values of instance constructed via `NewID`.
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
245a55f715 [#302] pkg/object: Convert nil ID to nil message
Document that `ID.ToV2` method return `nil`
when called on `nil`. Document that `NewIDFromV2`
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
Pavel Karpy
ff851215b0 [#302] pkg/object: Document default values set in NewAttribute
Document field values of instance constructed via `NewAttribute`.
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
941b513eb3 [#302] pkg/object: Convert nil Attribute to nil message
Document that `Attribute.ToV2` method return `nil`
when called on `nil`. Document that `NewAttributeFromV2`
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
Pavel Karpy
5fda8ef796 [#302] pkg/object: Document default values set in NewAddress
Document field values of instance constructed via `NewAddress`.
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
c978fa0e21 [#302] pkg/object: Convert nil Address to nil message
Document that `Address.ToV2` method return `nil`
when called on `nil`. Document that `NewAddressFromV2`
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
Pavel Karpy
2307c8f8f7 [#302] pkg/netmap: Document default values set in NewSelector
Document field values of instance constructed via `NewSelector`.
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
c47d1fb26b [#302] pkg/netmap: Convert nil Selector to nil message
Document that `Selector.ToV2` method return `nil`
when called on `nil`. Document that `NewSelectorFromV2`
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
Pavel Karpy
af1742b48a [#302] pkg/netmap: Document default values set in NewReplica
Document field values of instance constructed via `NewReplica`.
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
fb591f5fac [#302] pkg/netmap: Convert nil Replica to nil message
Document that `Replica.ToV2` method return `nil`
when called on `nil`. Document that `ReplicaFromV2`
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
Pavel Karpy
6fb7c79219 [#302] pkg/netmap: Document default values set in NewPlacementPolicy
Document field values of instance constructed via `NewPlacementPolicy`.
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
2176cb9f2b [#302] pkg/netmap: Convert nil PlacementPolicy to nil message
Document that `PlacementPolicy.ToV2` method return `nil`
when called on `nil`. Document that `PlacementPolicyFromV2`
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
Pavel Karpy
df4d610fad [#302] pkg/netmap: Document default values set in NewNodeInfo and NewNodeAttribute
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>
2021-06-09 17:23:35 +03:00
Pavel Karpy
05f48d9394 [#302] pkg/netmap: Convert nil NodeInfo and NodeAttribute to nil message
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>
2021-06-09 17:23:35 +03:00
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
Pavel Karpy
44437bf81a [#302] pkg/netmap: Document default values set in NewFilter
Make `filtersFromV2` return `nil` if passed
value is `nil`. Document field values of
instance constructed via `NewFilter`. 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
9a7e120485 [#302] pkg/netmap: Convert nil Filter to nil message
Make `Filter.ToV2` method return `nil`
when called on `nil`. Make `NewFilterFromV2`
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
Pavel Karpy
0206bd9a5d [#302] pkg/container: Convert nil Attributes to nil message
Make `Attributes.ToV2` method to return `nil`
when called on `nil`. Make `NewAttributesFromV2`
function to 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
Pavel Karpy
f92f9cd424 [#302] pkg/container: Document default values set in New
Make `nil` as a default value for attributes.
Document field values of instance constructed
via `New`. 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
c08b90dbbc [#302] pkg/container: Convert nil Container to nil message
Make `Container.ToV2` method to return `nil`
when called on `nil`. Write corresponding
unit test.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-06-09 17:23:35 +03:00
Pavel Karpy
3984353d37 [#302] pkg/container: Document default values set in NewAttribute
Document field values of instance constructed via `NewAttribute`.
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
8b7a433864 [#302] pkg/container: Convert nil Attribute to nil message
Document that `Attribute.ToV2` method returns
`nil` when is called on `nil`. Add
corresponding unit test.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-06-09 17:23:35 +03:00
Pavel Karpy
1863694b96 [#302] pkg/container: Document default values set in NewAnnouncement
Document field values of instance constructed via `NewAnnouncement`.
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
c54dee82be [#302] pkg/container: Convert nil UsedSpaceAnnouncement to nil message
Document that `UsedSpaceAnnouncement.ToV2` method returns
`nil` when is called on `nil`. Document that `NewAnnouncementFromV2`
method returns `nil` when is called on `nil`. Add
corresponding unit test.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-06-09 17:23:35 +03:00
Pavel Karpy
31ca5c14d3 [#302] pkg/container/id: Document default values set in New
Document field values of instance constructed via `New`.
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
6ce8844654 [#302] pkg/container/id: Convert nil ID to nil message
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>
2021-06-09 17:23:35 +03:00
Pavel Karpy
9fae0e4f2d [#302] pkg/audit: Document default values set in NewResult
Document field values of instance constructed via `NewResult`.
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
821e2951b6 [#302] pkg/audit: Convert nil Result to nil message
Document that `Result.ToV2` method returns
`nil` when is called on `nil`. Document that
`NewResultFromV2` method returns `nil` when
is called on `nil`. Add
corresponding unit test.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-06-09 17:23:35 +03:00
Leonard Lyubich
4e2ef6a30a [#293] pkg/eacl: Fix table encoding test with a temporary solution
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-06-08 18:59:15 +03:00
Leonard Lyubich
f2c9584fbc [#293] pkg/eacl: Do not set token and signature in Table generator
These fields aren't part of the message.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-06-08 18:59:15 +03:00
Leonard Lyubich
318755e9de [#293] pkg/storagegroup: Implement and use generator of StorageGroup
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-06-08 18:59:15 +03:00
Leonard Lyubich
cd32722d25 [#293] pkg/audit: Implement and use generator of Result
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-06-08 18:59:15 +03:00
Leonard Lyubich
00778cc9ba [#293] pkg/token: Implement and use generator of BearerToken
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-06-08 18:59:15 +03:00
Leonard Lyubich
122a31cadb [#293] pkg/container: Implement and use generators of the messages
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-06-08 18:59:15 +03:00
Leonard Lyubich
3cf0ea022d [#293] pkg/netmap: Implement generators of the messages
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-06-08 18:59:15 +03:00
Leonard Lyubich
cb6e01a103 [#293] pkg/object: Implement generators of the messages
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-06-08 18:59:15 +03:00
Leonard Lyubich
075003c4f1 [#293] pkg: Implement and use generators of the messages
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-06-08 18:59:15 +03:00
Leonard Lyubich
dd0a883637 [#293] pkg/object: Implement and use generator of ID
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-06-08 18:59:15 +03:00
Leonard Lyubich
72adf5f972 [#293] pkg/eacl: Implement and use generator of Table
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-06-08 18:59:15 +03:00
Leonard Lyubich
f406463c34 [#293] pkg/eacl: Implement generator of Record
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-06-08 18:59:15 +03:00
Leonard Lyubich
88a3829b39 [#293] pkg/eacl: Implement and use generator of Target
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-06-08 18:59:15 +03:00
Leonard Lyubich
e0ac55c526 [#293] pkg/accounting: Implement and use generator of Decimal
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-06-08 18:59:15 +03:00
Pavel Karpy
0f478a9dc6 [#301] pkg/object: Add MarshalHeaderJSON method
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-06-07 15:21:37 +03:00