frostfs-api-go/v2/service/grpc/verify.pb.go

1158 lines
29 KiB
Go
Raw Normal View History

2020-08-12 09:57:28 +00:00
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: v2/service/grpc/verify.proto
2020-08-12 09:57:28 +00:00
package service
2020-08-12 09:57:28 +00:00
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "github.com/nspcc-dev/neofs-api-go/v2/acl/grpc"
_ "github.com/nspcc-dev/neofs-api-go/v2/refs/grpc"
2020-08-12 09:57:28 +00:00
io "io"
math "math"
math_bits "math/bits"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// Signature of something in NeoFS
type Signature struct {
// Public key used for signing.
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// Signature
Sign []byte `protobuf:"bytes,2,opt,name=sign,proto3" json:"sign,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Signature) Reset() { *m = Signature{} }
func (m *Signature) String() string { return proto.CompactTextString(m) }
func (*Signature) ProtoMessage() {}
func (*Signature) Descriptor() ([]byte, []int) {
return fileDescriptor_333853833d6163d3, []int{0}
2020-08-12 09:57:28 +00:00
}
func (m *Signature) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Signature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Signature.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Signature) XXX_Merge(src proto.Message) {
xxx_messageInfo_Signature.Merge(m, src)
}
func (m *Signature) XXX_Size() int {
return m.Size()
}
func (m *Signature) XXX_DiscardUnknown() {
xxx_messageInfo_Signature.DiscardUnknown(m)
}
var xxx_messageInfo_Signature proto.InternalMessageInfo
func (m *Signature) GetKey() []byte {
if m != nil {
return m.Key
}
return nil
}
func (m *Signature) GetSign() []byte {
if m != nil {
return m.Sign
}
return nil
}
// Verification info for request signed by all intermediate nodes
type RequestVerificationHeader struct {
// Request Body signature. Should be generated once by request initiator.
BodySignature *Signature `protobuf:"bytes,1,opt,name=body_signature,json=bodySignature,proto3" json:"body_signature,omitempty"`
// Request Meta signature is added and signed by any intermediate node
MetaSignature *Signature `protobuf:"bytes,2,opt,name=meta_signature,json=metaSignature,proto3" json:"meta_signature,omitempty"`
// Sign previous hops
OriginSignature *Signature `protobuf:"bytes,3,opt,name=origin_signature,json=originSignature,proto3" json:"origin_signature,omitempty"`
// Chain of previous hops signatures
Origin *RequestVerificationHeader `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RequestVerificationHeader) Reset() { *m = RequestVerificationHeader{} }
func (m *RequestVerificationHeader) String() string { return proto.CompactTextString(m) }
func (*RequestVerificationHeader) ProtoMessage() {}
func (*RequestVerificationHeader) Descriptor() ([]byte, []int) {
return fileDescriptor_333853833d6163d3, []int{1}
2020-08-12 09:57:28 +00:00
}
func (m *RequestVerificationHeader) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *RequestVerificationHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_RequestVerificationHeader.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *RequestVerificationHeader) XXX_Merge(src proto.Message) {
xxx_messageInfo_RequestVerificationHeader.Merge(m, src)
}
func (m *RequestVerificationHeader) XXX_Size() int {
return m.Size()
}
func (m *RequestVerificationHeader) XXX_DiscardUnknown() {
xxx_messageInfo_RequestVerificationHeader.DiscardUnknown(m)
}
var xxx_messageInfo_RequestVerificationHeader proto.InternalMessageInfo
func (m *RequestVerificationHeader) GetBodySignature() *Signature {
if m != nil {
return m.BodySignature
}
return nil
}
func (m *RequestVerificationHeader) GetMetaSignature() *Signature {
if m != nil {
return m.MetaSignature
}
return nil
}
func (m *RequestVerificationHeader) GetOriginSignature() *Signature {
if m != nil {
return m.OriginSignature
}
return nil
}
func (m *RequestVerificationHeader) GetOrigin() *RequestVerificationHeader {
if m != nil {
return m.Origin
}
return nil
}
// Verification info for response signed by all intermediate nodes
type ResponseVerificationHeader struct {
// Response Body signature. Should be generated once by answering node.
BodySignature *Signature `protobuf:"bytes,1,opt,name=body_signature,json=bodySignature,proto3" json:"body_signature,omitempty"`
// Response Meta signature is added and signed by any intermediate node
MetaSignature *Signature `protobuf:"bytes,2,opt,name=meta_signature,json=metaSignature,proto3" json:"meta_signature,omitempty"`
// Sign previous hops
OriginSignature *Signature `protobuf:"bytes,3,opt,name=origin_signature,json=originSignature,proto3" json:"origin_signature,omitempty"`
// Chain of previous hops signatures
Origin *ResponseVerificationHeader `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ResponseVerificationHeader) Reset() { *m = ResponseVerificationHeader{} }
func (m *ResponseVerificationHeader) String() string { return proto.CompactTextString(m) }
func (*ResponseVerificationHeader) ProtoMessage() {}
func (*ResponseVerificationHeader) Descriptor() ([]byte, []int) {
return fileDescriptor_333853833d6163d3, []int{2}
2020-08-12 09:57:28 +00:00
}
func (m *ResponseVerificationHeader) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ResponseVerificationHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ResponseVerificationHeader.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *ResponseVerificationHeader) XXX_Merge(src proto.Message) {
xxx_messageInfo_ResponseVerificationHeader.Merge(m, src)
}
func (m *ResponseVerificationHeader) XXX_Size() int {
return m.Size()
}
func (m *ResponseVerificationHeader) XXX_DiscardUnknown() {
xxx_messageInfo_ResponseVerificationHeader.DiscardUnknown(m)
}
var xxx_messageInfo_ResponseVerificationHeader proto.InternalMessageInfo
func (m *ResponseVerificationHeader) GetBodySignature() *Signature {
if m != nil {
return m.BodySignature
}
return nil
}
func (m *ResponseVerificationHeader) GetMetaSignature() *Signature {
if m != nil {
return m.MetaSignature
}
return nil
}
func (m *ResponseVerificationHeader) GetOriginSignature() *Signature {
if m != nil {
return m.OriginSignature
}
return nil
}
func (m *ResponseVerificationHeader) GetOrigin() *ResponseVerificationHeader {
if m != nil {
return m.Origin
}
return nil
}
func init() {
proto.RegisterType((*Signature)(nil), "neo.fs.v2.service.Signature")
proto.RegisterType((*RequestVerificationHeader)(nil), "neo.fs.v2.service.RequestVerificationHeader")
proto.RegisterType((*ResponseVerificationHeader)(nil), "neo.fs.v2.service.ResponseVerificationHeader")
2020-08-12 09:57:28 +00:00
}
func init() { proto.RegisterFile("v2/service/grpc/verify.proto", fileDescriptor_333853833d6163d3) }
2020-08-12 09:57:28 +00:00
var fileDescriptor_333853833d6163d3 = []byte{
// 361 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x93, 0xcf, 0x4a, 0xeb, 0x40,
0x14, 0xc6, 0x6f, 0xd2, 0x52, 0xb8, 0x73, 0xef, 0xed, 0xad, 0x41, 0x30, 0x96, 0x12, 0xa4, 0x2b,
0x17, 0x66, 0x06, 0xe3, 0x4a, 0x5c, 0x69, 0xfd, 0xbb, 0x11, 0x49, 0xc1, 0x85, 0x1b, 0x49, 0xd2,
0x93, 0x38, 0x68, 0x67, 0xe2, 0xcc, 0x74, 0x20, 0x6f, 0xe2, 0x33, 0xb8, 0x16, 0x9f, 0xc1, 0xa5,
0x8f, 0x20, 0xf5, 0x45, 0x24, 0x49, 0x6b, 0x4b, 0xff, 0x40, 0xf7, 0xee, 0x4e, 0x4e, 0xbe, 0xef,
0x37, 0x1f, 0x1f, 0x1c, 0xd4, 0xd2, 0x1e, 0x91, 0x20, 0x34, 0x8d, 0x80, 0x24, 0x22, 0x8d, 0x88,
0x06, 0x41, 0xe3, 0x0c, 0xa7, 0x82, 0x2b, 0x6e, 0xad, 0x31, 0xe0, 0x38, 0x96, 0x58, 0x7b, 0x78,
0x24, 0x6a, 0x6e, 0x68, 0x8f, 0x04, 0xd1, 0x43, 0x29, 0x56, 0x59, 0x0a, 0xb2, 0xd4, 0x36, 0x6d,
0xed, 0x11, 0x01, 0xb1, 0x9c, 0xfb, 0xd3, 0xde, 0x45, 0xbf, 0xbb, 0x34, 0x61, 0x81, 0x1a, 0x08,
0xb0, 0x1a, 0xa8, 0x72, 0x0f, 0x99, 0x6d, 0x6c, 0x19, 0xdb, 0x7f, 0xfd, 0x7c, 0xb4, 0x2c, 0x54,
0x95, 0x34, 0x61, 0xb6, 0x59, 0xac, 0x8a, 0xb9, 0xfd, 0x62, 0xa2, 0x4d, 0x1f, 0x1e, 0x07, 0x20,
0xd5, 0x75, 0x1e, 0x88, 0x46, 0x81, 0xa2, 0x9c, 0x9d, 0x43, 0xd0, 0x03, 0x61, 0x75, 0x50, 0x3d,
0xe4, 0xbd, 0xec, 0x56, 0x8e, 0xa9, 0x05, 0xee, 0x8f, 0xd7, 0xc2, 0x73, 0x79, 0xf1, 0xf7, 0xcb,
0xfe, 0xbf, 0xdc, 0x33, 0x09, 0xd2, 0x41, 0xf5, 0x3e, 0xa8, 0x60, 0x0a, 0x62, 0xae, 0x02, 0xc9,
0x3d, 0x13, 0xc8, 0x19, 0x6a, 0x70, 0x41, 0x13, 0xca, 0xa6, 0x30, 0x95, 0x15, 0x30, 0xff, 0x4b,
0xd7, 0x04, 0x74, 0x8c, 0x6a, 0xe5, 0xca, 0xae, 0x16, 0xf6, 0x9d, 0x05, 0xf6, 0xa5, 0x85, 0xf8,
0x23, 0x6f, 0xfb, 0xd5, 0x44, 0x4d, 0x1f, 0x64, 0xca, 0x99, 0x84, 0x9f, 0xd1, 0xdb, 0xc9, 0x4c,
0x6f, 0xee, 0xc2, 0xde, 0x96, 0x35, 0x32, 0x2e, 0xee, 0x28, 0x7c, 0x1b, 0x3a, 0xc6, 0xfb, 0xd0,
0x31, 0x3e, 0x86, 0x8e, 0xf1, 0xf4, 0xe9, 0xfc, 0xba, 0xd9, 0x4f, 0xa8, 0xba, 0x1b, 0x84, 0x38,
0xe2, 0x7d, 0xc2, 0x64, 0x1a, 0x45, 0x6e, 0x0f, 0x34, 0x61, 0xc0, 0x63, 0xe9, 0x06, 0x29, 0x75,
0x13, 0x4e, 0x66, 0x4e, 0xe7, 0x60, 0xf4, 0xf1, 0x6c, 0xae, 0x5f, 0x02, 0x3f, 0xed, 0xe2, 0xc3,
0xab, 0x8b, 0x3c, 0x46, 0xb7, 0x5c, 0x87, 0xb5, 0xe2, 0x1a, 0xf6, 0xbe, 0x02, 0x00, 0x00, 0xff,
0xff, 0x66, 0xc2, 0xc4, 0xb8, 0x73, 0x03, 0x00, 0x00,
2020-08-12 09:57:28 +00:00
}
func (m *Signature) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Signature) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Signature) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.Sign) > 0 {
i -= len(m.Sign)
copy(dAtA[i:], m.Sign)
i = encodeVarintVerify(dAtA, i, uint64(len(m.Sign)))
i--
dAtA[i] = 0x12
}
if len(m.Key) > 0 {
i -= len(m.Key)
copy(dAtA[i:], m.Key)
i = encodeVarintVerify(dAtA, i, uint64(len(m.Key)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *RequestVerificationHeader) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *RequestVerificationHeader) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *RequestVerificationHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.Origin != nil {
{
size, err := m.Origin.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintVerify(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x22
}
if m.OriginSignature != nil {
{
size, err := m.OriginSignature.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintVerify(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
}
if m.MetaSignature != nil {
{
size, err := m.MetaSignature.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintVerify(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
if m.BodySignature != nil {
{
size, err := m.BodySignature.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintVerify(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *ResponseVerificationHeader) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *ResponseVerificationHeader) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ResponseVerificationHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.Origin != nil {
{
size, err := m.Origin.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintVerify(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x22
}
if m.OriginSignature != nil {
{
size, err := m.OriginSignature.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintVerify(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
}
if m.MetaSignature != nil {
{
size, err := m.MetaSignature.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintVerify(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
if m.BodySignature != nil {
{
size, err := m.BodySignature.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintVerify(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintVerify(dAtA []byte, offset int, v uint64) int {
offset -= sovVerify(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *Signature) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Key)
if l > 0 {
n += 1 + l + sovVerify(uint64(l))
}
l = len(m.Sign)
if l > 0 {
n += 1 + l + sovVerify(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *RequestVerificationHeader) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.BodySignature != nil {
l = m.BodySignature.Size()
n += 1 + l + sovVerify(uint64(l))
}
if m.MetaSignature != nil {
l = m.MetaSignature.Size()
n += 1 + l + sovVerify(uint64(l))
}
if m.OriginSignature != nil {
l = m.OriginSignature.Size()
n += 1 + l + sovVerify(uint64(l))
}
if m.Origin != nil {
l = m.Origin.Size()
n += 1 + l + sovVerify(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *ResponseVerificationHeader) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.BodySignature != nil {
l = m.BodySignature.Size()
n += 1 + l + sovVerify(uint64(l))
}
if m.MetaSignature != nil {
l = m.MetaSignature.Size()
n += 1 + l + sovVerify(uint64(l))
}
if m.OriginSignature != nil {
l = m.OriginSignature.Size()
n += 1 + l + sovVerify(uint64(l))
}
if m.Origin != nil {
l = m.Origin.Size()
n += 1 + l + sovVerify(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovVerify(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozVerify(x uint64) (n int) {
return sovVerify(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Signature) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowVerify
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Signature: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Signature: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowVerify
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthVerify
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthVerify
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
if m.Key == nil {
m.Key = []byte{}
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Sign", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowVerify
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthVerify
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthVerify
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Sign = append(m.Sign[:0], dAtA[iNdEx:postIndex]...)
if m.Sign == nil {
m.Sign = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipVerify(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthVerify
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthVerify
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *RequestVerificationHeader) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowVerify
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: RequestVerificationHeader: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: RequestVerificationHeader: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field BodySignature", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowVerify
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthVerify
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthVerify
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.BodySignature == nil {
m.BodySignature = &Signature{}
}
if err := m.BodySignature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field MetaSignature", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowVerify
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthVerify
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthVerify
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.MetaSignature == nil {
m.MetaSignature = &Signature{}
}
if err := m.MetaSignature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field OriginSignature", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowVerify
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthVerify
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthVerify
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.OriginSignature == nil {
m.OriginSignature = &Signature{}
}
if err := m.OriginSignature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowVerify
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthVerify
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthVerify
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Origin == nil {
m.Origin = &RequestVerificationHeader{}
}
if err := m.Origin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipVerify(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthVerify
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthVerify
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *ResponseVerificationHeader) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowVerify
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: ResponseVerificationHeader: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ResponseVerificationHeader: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field BodySignature", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowVerify
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthVerify
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthVerify
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.BodySignature == nil {
m.BodySignature = &Signature{}
}
if err := m.BodySignature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field MetaSignature", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowVerify
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthVerify
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthVerify
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.MetaSignature == nil {
m.MetaSignature = &Signature{}
}
if err := m.MetaSignature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field OriginSignature", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowVerify
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthVerify
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthVerify
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.OriginSignature == nil {
m.OriginSignature = &Signature{}
}
if err := m.OriginSignature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowVerify
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthVerify
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthVerify
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Origin == nil {
m.Origin = &ResponseVerificationHeader{}
}
if err := m.Origin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipVerify(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthVerify
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthVerify
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipVerify(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowVerify
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowVerify
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowVerify
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthVerify
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupVerify
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthVerify
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthVerify = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowVerify = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupVerify = fmt.Errorf("proto: unexpected end of group")
)