From d3b5ff9526c120fbc8b7cc25e9c0e09d1bf8499d Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Mon, 21 Sep 2020 12:38:13 +0300 Subject: [PATCH] [#33] session/storage: Change Get method signature In previous implementation session Storage.Get method took a v2 owner identifier as an argument. Change method signature to as an argument owner identifier from NeoFS SDK. Signed-off-by: Leonard Lyubich --- pkg/services/session/storage/storage.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/services/session/storage/storage.go b/pkg/services/session/storage/storage.go index ec671349c..f0390bd47 100644 --- a/pkg/services/session/storage/storage.go +++ b/pkg/services/session/storage/storage.go @@ -5,7 +5,7 @@ import ( "sync" "github.com/mr-tron/base58" - "github.com/nspcc-dev/neofs-api-go/v2/refs" + "github.com/nspcc-dev/neofs-api-go/pkg/owner" ) type key struct { @@ -34,8 +34,8 @@ func New() *TokenStore { // Get returns private token corresponding to the given identifiers. // // Returns nil is there is no element in storage. -func (s *TokenStore) Get(ownerID *refs.OwnerID, tokenID []byte) *PrivateToken { - ownerBytes, err := ownerID.StableMarshal(nil) +func (s *TokenStore) Get(ownerID *owner.ID, tokenID []byte) *PrivateToken { + ownerBytes, err := ownerID.ToV2().StableMarshal(nil) if err != nil { panic(err) }