session: implement function for receiving session public key bytes

After recent changes PrivateToken cannot directly return public key
bytes. In order to provide this ability, this commit implements
a function over PrivateToken interface.
This commit is contained in:
Leonard Lyubich 2020-05-18 13:14:18 +03:00
parent af28735ca6
commit 291d512840
3 changed files with 49 additions and 1 deletions

View file

@ -13,3 +13,7 @@ const ErrNilGPRCClientConn = internal.Error("gRPC client connection is nil")
// ErrPrivateTokenNotFound is returned when addressed private token was
// not found in storage.
const ErrPrivateTokenNotFound = internal.Error("private token not found")
// ErrNilPrivateToken is returned by functions that expect a non-nil
// PrivateToken, but received nil.
const ErrNilPrivateToken = internal.Error("private token is nil")