[#371] Support recent changes in NeoFS API protocol

Support:
  * new status codes (object, container, session);
  * object `Lock` message;
  * different signature schemes.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-02-21 20:57:27 +03:00 committed by LeL
parent a4349f6692
commit 99370889d1
41 changed files with 1139 additions and 129 deletions

View file

@ -2,6 +2,7 @@ package objecttest
import (
"github.com/nspcc-dev/neofs-api-go/v2/object"
"github.com/nspcc-dev/neofs-api-go/v2/refs"
refstest "github.com/nspcc-dev/neofs-api-go/v2/refs/test"
sessiontest "github.com/nspcc-dev/neofs-api-go/v2/session/test"
)
@ -571,3 +572,16 @@ func GenerateGetRangeHashResponse(empty bool) *object.GetRangeHashResponse {
return m
}
func GenerateLock(empty bool) *object.Lock {
m := new(object.Lock)
if !empty {
m.SetMembers([]refs.ObjectID{
*refstest.GenerateObjectID(false),
*refstest.GenerateObjectID(false),
})
}
return m
}