[#168] session: Implement binary/JSON encoders/decoders on ResponseVerify

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-11-13 17:14:43 +03:00 committed by Alex Vanin
parent edf6ec05b3
commit 6456fcf8fa
4 changed files with 45 additions and 4 deletions

View file

@ -745,3 +745,14 @@ func (r *ResponseVerificationHeader) StableSize() (size int) {
return size
}
func (r *ResponseVerificationHeader) Unmarshal(data []byte) error {
m := new(session.ResponseVerificationHeader)
if err := goproto.Unmarshal(data, m); err != nil {
return err
}
*r = *ResponseVerificationHeaderFromGRPCMessage(m)
return nil
}