You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
938 lines
22 KiB
938 lines
22 KiB
// Code generated by protoc-gen-gogo. DO NOT EDIT. |
|
// source: v1/Gift.proto |
|
|
|
package v1 |
|
|
|
import proto "github.com/gogo/protobuf/proto" |
|
import fmt "fmt" |
|
import math "math" |
|
import _ "github.com/gogo/protobuf/gogoproto" |
|
|
|
import io "io" |
|
|
|
// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package |
|
|
|
type GiftAddFreeGiftReq struct { |
|
// 用户uid |
|
Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid"` |
|
// 礼物id |
|
Giftid int64 `protobuf:"varint,2,opt,name=giftid,proto3" json:"giftid"` |
|
// 数量 |
|
Num int64 `protobuf:"varint,3,opt,name=num,proto3" json:"num"` |
|
// 过期时间 |
|
Expireat int64 `protobuf:"varint,4,opt,name=expireat,proto3" json:"expireat"` |
|
// |
|
Code string `protobuf:"bytes,5,opt,name=code,proto3" json:"code"` |
|
// |
|
Caller string `protobuf:"bytes,6,opt,name=caller,proto3" json:"caller"` |
|
} |
|
|
|
func (m *GiftAddFreeGiftReq) Reset() { *m = GiftAddFreeGiftReq{} } |
|
func (m *GiftAddFreeGiftReq) String() string { return proto.CompactTextString(m) } |
|
func (*GiftAddFreeGiftReq) ProtoMessage() {} |
|
func (*GiftAddFreeGiftReq) Descriptor() ([]byte, []int) { |
|
return fileDescriptor_Gift_7d77e02c48c2917b, []int{0} |
|
} |
|
func (m *GiftAddFreeGiftReq) XXX_Unmarshal(b []byte) error { |
|
return m.Unmarshal(b) |
|
} |
|
func (m *GiftAddFreeGiftReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
|
if deterministic { |
|
return xxx_messageInfo_GiftAddFreeGiftReq.Marshal(b, m, deterministic) |
|
} else { |
|
b = b[:cap(b)] |
|
n, err := m.MarshalTo(b) |
|
if err != nil { |
|
return nil, err |
|
} |
|
return b[:n], nil |
|
} |
|
} |
|
func (dst *GiftAddFreeGiftReq) XXX_Merge(src proto.Message) { |
|
xxx_messageInfo_GiftAddFreeGiftReq.Merge(dst, src) |
|
} |
|
func (m *GiftAddFreeGiftReq) XXX_Size() int { |
|
return m.Size() |
|
} |
|
func (m *GiftAddFreeGiftReq) XXX_DiscardUnknown() { |
|
xxx_messageInfo_GiftAddFreeGiftReq.DiscardUnknown(m) |
|
} |
|
|
|
var xxx_messageInfo_GiftAddFreeGiftReq proto.InternalMessageInfo |
|
|
|
func (m *GiftAddFreeGiftReq) GetUid() int64 { |
|
if m != nil { |
|
return m.Uid |
|
} |
|
return 0 |
|
} |
|
|
|
func (m *GiftAddFreeGiftReq) GetGiftid() int64 { |
|
if m != nil { |
|
return m.Giftid |
|
} |
|
return 0 |
|
} |
|
|
|
func (m *GiftAddFreeGiftReq) GetNum() int64 { |
|
if m != nil { |
|
return m.Num |
|
} |
|
return 0 |
|
} |
|
|
|
func (m *GiftAddFreeGiftReq) GetExpireat() int64 { |
|
if m != nil { |
|
return m.Expireat |
|
} |
|
return 0 |
|
} |
|
|
|
func (m *GiftAddFreeGiftReq) GetCode() string { |
|
if m != nil { |
|
return m.Code |
|
} |
|
return "" |
|
} |
|
|
|
func (m *GiftAddFreeGiftReq) GetCaller() string { |
|
if m != nil { |
|
return m.Caller |
|
} |
|
return "" |
|
} |
|
|
|
type GiftAddFreeGiftResp struct { |
|
// |
|
Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code"` |
|
// |
|
Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg"` |
|
// |
|
Data *GiftAddFreeGiftResp_Data `protobuf:"bytes,3,opt,name=data" json:"data"` |
|
} |
|
|
|
func (m *GiftAddFreeGiftResp) Reset() { *m = GiftAddFreeGiftResp{} } |
|
func (m *GiftAddFreeGiftResp) String() string { return proto.CompactTextString(m) } |
|
func (*GiftAddFreeGiftResp) ProtoMessage() {} |
|
func (*GiftAddFreeGiftResp) Descriptor() ([]byte, []int) { |
|
return fileDescriptor_Gift_7d77e02c48c2917b, []int{1} |
|
} |
|
func (m *GiftAddFreeGiftResp) XXX_Unmarshal(b []byte) error { |
|
return m.Unmarshal(b) |
|
} |
|
func (m *GiftAddFreeGiftResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
|
if deterministic { |
|
return xxx_messageInfo_GiftAddFreeGiftResp.Marshal(b, m, deterministic) |
|
} else { |
|
b = b[:cap(b)] |
|
n, err := m.MarshalTo(b) |
|
if err != nil { |
|
return nil, err |
|
} |
|
return b[:n], nil |
|
} |
|
} |
|
func (dst *GiftAddFreeGiftResp) XXX_Merge(src proto.Message) { |
|
xxx_messageInfo_GiftAddFreeGiftResp.Merge(dst, src) |
|
} |
|
func (m *GiftAddFreeGiftResp) XXX_Size() int { |
|
return m.Size() |
|
} |
|
func (m *GiftAddFreeGiftResp) XXX_DiscardUnknown() { |
|
xxx_messageInfo_GiftAddFreeGiftResp.DiscardUnknown(m) |
|
} |
|
|
|
var xxx_messageInfo_GiftAddFreeGiftResp proto.InternalMessageInfo |
|
|
|
func (m *GiftAddFreeGiftResp) GetCode() int64 { |
|
if m != nil { |
|
return m.Code |
|
} |
|
return 0 |
|
} |
|
|
|
func (m *GiftAddFreeGiftResp) GetMsg() string { |
|
if m != nil { |
|
return m.Msg |
|
} |
|
return "" |
|
} |
|
|
|
func (m *GiftAddFreeGiftResp) GetData() *GiftAddFreeGiftResp_Data { |
|
if m != nil { |
|
return m.Data |
|
} |
|
return nil |
|
} |
|
|
|
type GiftAddFreeGiftResp_Data struct { |
|
// |
|
BagId int64 `protobuf:"varint,1,opt,name=bag_id,json=bagId,proto3" json:"bag_id"` |
|
} |
|
|
|
func (m *GiftAddFreeGiftResp_Data) Reset() { *m = GiftAddFreeGiftResp_Data{} } |
|
func (m *GiftAddFreeGiftResp_Data) String() string { return proto.CompactTextString(m) } |
|
func (*GiftAddFreeGiftResp_Data) ProtoMessage() {} |
|
func (*GiftAddFreeGiftResp_Data) Descriptor() ([]byte, []int) { |
|
return fileDescriptor_Gift_7d77e02c48c2917b, []int{1, 0} |
|
} |
|
func (m *GiftAddFreeGiftResp_Data) XXX_Unmarshal(b []byte) error { |
|
return m.Unmarshal(b) |
|
} |
|
func (m *GiftAddFreeGiftResp_Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
|
if deterministic { |
|
return xxx_messageInfo_GiftAddFreeGiftResp_Data.Marshal(b, m, deterministic) |
|
} else { |
|
b = b[:cap(b)] |
|
n, err := m.MarshalTo(b) |
|
if err != nil { |
|
return nil, err |
|
} |
|
return b[:n], nil |
|
} |
|
} |
|
func (dst *GiftAddFreeGiftResp_Data) XXX_Merge(src proto.Message) { |
|
xxx_messageInfo_GiftAddFreeGiftResp_Data.Merge(dst, src) |
|
} |
|
func (m *GiftAddFreeGiftResp_Data) XXX_Size() int { |
|
return m.Size() |
|
} |
|
func (m *GiftAddFreeGiftResp_Data) XXX_DiscardUnknown() { |
|
xxx_messageInfo_GiftAddFreeGiftResp_Data.DiscardUnknown(m) |
|
} |
|
|
|
var xxx_messageInfo_GiftAddFreeGiftResp_Data proto.InternalMessageInfo |
|
|
|
func (m *GiftAddFreeGiftResp_Data) GetBagId() int64 { |
|
if m != nil { |
|
return m.BagId |
|
} |
|
return 0 |
|
} |
|
|
|
func init() { |
|
proto.RegisterType((*GiftAddFreeGiftReq)(nil), "gift.v1.GiftAddFreeGiftReq") |
|
proto.RegisterType((*GiftAddFreeGiftResp)(nil), "gift.v1.GiftAddFreeGiftResp") |
|
proto.RegisterType((*GiftAddFreeGiftResp_Data)(nil), "gift.v1.GiftAddFreeGiftResp.Data") |
|
} |
|
func (m *GiftAddFreeGiftReq) Marshal() (dAtA []byte, err error) { |
|
size := m.Size() |
|
dAtA = make([]byte, size) |
|
n, err := m.MarshalTo(dAtA) |
|
if err != nil { |
|
return nil, err |
|
} |
|
return dAtA[:n], nil |
|
} |
|
|
|
func (m *GiftAddFreeGiftReq) MarshalTo(dAtA []byte) (int, error) { |
|
var i int |
|
_ = i |
|
var l int |
|
_ = l |
|
if m.Uid != 0 { |
|
dAtA[i] = 0x8 |
|
i++ |
|
i = encodeVarintGift(dAtA, i, uint64(m.Uid)) |
|
} |
|
if m.Giftid != 0 { |
|
dAtA[i] = 0x10 |
|
i++ |
|
i = encodeVarintGift(dAtA, i, uint64(m.Giftid)) |
|
} |
|
if m.Num != 0 { |
|
dAtA[i] = 0x18 |
|
i++ |
|
i = encodeVarintGift(dAtA, i, uint64(m.Num)) |
|
} |
|
if m.Expireat != 0 { |
|
dAtA[i] = 0x20 |
|
i++ |
|
i = encodeVarintGift(dAtA, i, uint64(m.Expireat)) |
|
} |
|
if len(m.Code) > 0 { |
|
dAtA[i] = 0x2a |
|
i++ |
|
i = encodeVarintGift(dAtA, i, uint64(len(m.Code))) |
|
i += copy(dAtA[i:], m.Code) |
|
} |
|
if len(m.Caller) > 0 { |
|
dAtA[i] = 0x32 |
|
i++ |
|
i = encodeVarintGift(dAtA, i, uint64(len(m.Caller))) |
|
i += copy(dAtA[i:], m.Caller) |
|
} |
|
return i, nil |
|
} |
|
|
|
func (m *GiftAddFreeGiftResp) Marshal() (dAtA []byte, err error) { |
|
size := m.Size() |
|
dAtA = make([]byte, size) |
|
n, err := m.MarshalTo(dAtA) |
|
if err != nil { |
|
return nil, err |
|
} |
|
return dAtA[:n], nil |
|
} |
|
|
|
func (m *GiftAddFreeGiftResp) MarshalTo(dAtA []byte) (int, error) { |
|
var i int |
|
_ = i |
|
var l int |
|
_ = l |
|
if m.Code != 0 { |
|
dAtA[i] = 0x8 |
|
i++ |
|
i = encodeVarintGift(dAtA, i, uint64(m.Code)) |
|
} |
|
if len(m.Msg) > 0 { |
|
dAtA[i] = 0x12 |
|
i++ |
|
i = encodeVarintGift(dAtA, i, uint64(len(m.Msg))) |
|
i += copy(dAtA[i:], m.Msg) |
|
} |
|
if m.Data != nil { |
|
dAtA[i] = 0x1a |
|
i++ |
|
i = encodeVarintGift(dAtA, i, uint64(m.Data.Size())) |
|
n1, err := m.Data.MarshalTo(dAtA[i:]) |
|
if err != nil { |
|
return 0, err |
|
} |
|
i += n1 |
|
} |
|
return i, nil |
|
} |
|
|
|
func (m *GiftAddFreeGiftResp_Data) Marshal() (dAtA []byte, err error) { |
|
size := m.Size() |
|
dAtA = make([]byte, size) |
|
n, err := m.MarshalTo(dAtA) |
|
if err != nil { |
|
return nil, err |
|
} |
|
return dAtA[:n], nil |
|
} |
|
|
|
func (m *GiftAddFreeGiftResp_Data) MarshalTo(dAtA []byte) (int, error) { |
|
var i int |
|
_ = i |
|
var l int |
|
_ = l |
|
if m.BagId != 0 { |
|
dAtA[i] = 0x8 |
|
i++ |
|
i = encodeVarintGift(dAtA, i, uint64(m.BagId)) |
|
} |
|
return i, nil |
|
} |
|
|
|
func encodeVarintGift(dAtA []byte, offset int, v uint64) int { |
|
for v >= 1<<7 { |
|
dAtA[offset] = uint8(v&0x7f | 0x80) |
|
v >>= 7 |
|
offset++ |
|
} |
|
dAtA[offset] = uint8(v) |
|
return offset + 1 |
|
} |
|
func (m *GiftAddFreeGiftReq) Size() (n int) { |
|
if m == nil { |
|
return 0 |
|
} |
|
var l int |
|
_ = l |
|
if m.Uid != 0 { |
|
n += 1 + sovGift(uint64(m.Uid)) |
|
} |
|
if m.Giftid != 0 { |
|
n += 1 + sovGift(uint64(m.Giftid)) |
|
} |
|
if m.Num != 0 { |
|
n += 1 + sovGift(uint64(m.Num)) |
|
} |
|
if m.Expireat != 0 { |
|
n += 1 + sovGift(uint64(m.Expireat)) |
|
} |
|
l = len(m.Code) |
|
if l > 0 { |
|
n += 1 + l + sovGift(uint64(l)) |
|
} |
|
l = len(m.Caller) |
|
if l > 0 { |
|
n += 1 + l + sovGift(uint64(l)) |
|
} |
|
return n |
|
} |
|
|
|
func (m *GiftAddFreeGiftResp) Size() (n int) { |
|
if m == nil { |
|
return 0 |
|
} |
|
var l int |
|
_ = l |
|
if m.Code != 0 { |
|
n += 1 + sovGift(uint64(m.Code)) |
|
} |
|
l = len(m.Msg) |
|
if l > 0 { |
|
n += 1 + l + sovGift(uint64(l)) |
|
} |
|
if m.Data != nil { |
|
l = m.Data.Size() |
|
n += 1 + l + sovGift(uint64(l)) |
|
} |
|
return n |
|
} |
|
|
|
func (m *GiftAddFreeGiftResp_Data) Size() (n int) { |
|
if m == nil { |
|
return 0 |
|
} |
|
var l int |
|
_ = l |
|
if m.BagId != 0 { |
|
n += 1 + sovGift(uint64(m.BagId)) |
|
} |
|
return n |
|
} |
|
|
|
func sovGift(x uint64) (n int) { |
|
for { |
|
n++ |
|
x >>= 7 |
|
if x == 0 { |
|
break |
|
} |
|
} |
|
return n |
|
} |
|
func sozGift(x uint64) (n int) { |
|
return sovGift(uint64((x << 1) ^ uint64((int64(x) >> 63)))) |
|
} |
|
func (m *GiftAddFreeGiftReq) 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 ErrIntOverflowGift |
|
} |
|
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: GiftAddFreeGiftReq: wiretype end group for non-group") |
|
} |
|
if fieldNum <= 0 { |
|
return fmt.Errorf("proto: GiftAddFreeGiftReq: illegal tag %d (wire type %d)", fieldNum, wire) |
|
} |
|
switch fieldNum { |
|
case 1: |
|
if wireType != 0 { |
|
return fmt.Errorf("proto: wrong wireType = %d for field Uid", wireType) |
|
} |
|
m.Uid = 0 |
|
for shift := uint(0); ; shift += 7 { |
|
if shift >= 64 { |
|
return ErrIntOverflowGift |
|
} |
|
if iNdEx >= l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
b := dAtA[iNdEx] |
|
iNdEx++ |
|
m.Uid |= (int64(b) & 0x7F) << shift |
|
if b < 0x80 { |
|
break |
|
} |
|
} |
|
case 2: |
|
if wireType != 0 { |
|
return fmt.Errorf("proto: wrong wireType = %d for field Giftid", wireType) |
|
} |
|
m.Giftid = 0 |
|
for shift := uint(0); ; shift += 7 { |
|
if shift >= 64 { |
|
return ErrIntOverflowGift |
|
} |
|
if iNdEx >= l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
b := dAtA[iNdEx] |
|
iNdEx++ |
|
m.Giftid |= (int64(b) & 0x7F) << shift |
|
if b < 0x80 { |
|
break |
|
} |
|
} |
|
case 3: |
|
if wireType != 0 { |
|
return fmt.Errorf("proto: wrong wireType = %d for field Num", wireType) |
|
} |
|
m.Num = 0 |
|
for shift := uint(0); ; shift += 7 { |
|
if shift >= 64 { |
|
return ErrIntOverflowGift |
|
} |
|
if iNdEx >= l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
b := dAtA[iNdEx] |
|
iNdEx++ |
|
m.Num |= (int64(b) & 0x7F) << shift |
|
if b < 0x80 { |
|
break |
|
} |
|
} |
|
case 4: |
|
if wireType != 0 { |
|
return fmt.Errorf("proto: wrong wireType = %d for field Expireat", wireType) |
|
} |
|
m.Expireat = 0 |
|
for shift := uint(0); ; shift += 7 { |
|
if shift >= 64 { |
|
return ErrIntOverflowGift |
|
} |
|
if iNdEx >= l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
b := dAtA[iNdEx] |
|
iNdEx++ |
|
m.Expireat |= (int64(b) & 0x7F) << shift |
|
if b < 0x80 { |
|
break |
|
} |
|
} |
|
case 5: |
|
if wireType != 2 { |
|
return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) |
|
} |
|
var stringLen uint64 |
|
for shift := uint(0); ; shift += 7 { |
|
if shift >= 64 { |
|
return ErrIntOverflowGift |
|
} |
|
if iNdEx >= l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
b := dAtA[iNdEx] |
|
iNdEx++ |
|
stringLen |= (uint64(b) & 0x7F) << shift |
|
if b < 0x80 { |
|
break |
|
} |
|
} |
|
intStringLen := int(stringLen) |
|
if intStringLen < 0 { |
|
return ErrInvalidLengthGift |
|
} |
|
postIndex := iNdEx + intStringLen |
|
if postIndex > l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
m.Code = string(dAtA[iNdEx:postIndex]) |
|
iNdEx = postIndex |
|
case 6: |
|
if wireType != 2 { |
|
return fmt.Errorf("proto: wrong wireType = %d for field Caller", wireType) |
|
} |
|
var stringLen uint64 |
|
for shift := uint(0); ; shift += 7 { |
|
if shift >= 64 { |
|
return ErrIntOverflowGift |
|
} |
|
if iNdEx >= l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
b := dAtA[iNdEx] |
|
iNdEx++ |
|
stringLen |= (uint64(b) & 0x7F) << shift |
|
if b < 0x80 { |
|
break |
|
} |
|
} |
|
intStringLen := int(stringLen) |
|
if intStringLen < 0 { |
|
return ErrInvalidLengthGift |
|
} |
|
postIndex := iNdEx + intStringLen |
|
if postIndex > l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
m.Caller = string(dAtA[iNdEx:postIndex]) |
|
iNdEx = postIndex |
|
default: |
|
iNdEx = preIndex |
|
skippy, err := skipGift(dAtA[iNdEx:]) |
|
if err != nil { |
|
return err |
|
} |
|
if skippy < 0 { |
|
return ErrInvalidLengthGift |
|
} |
|
if (iNdEx + skippy) > l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
iNdEx += skippy |
|
} |
|
} |
|
|
|
if iNdEx > l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
return nil |
|
} |
|
func (m *GiftAddFreeGiftResp) 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 ErrIntOverflowGift |
|
} |
|
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: GiftAddFreeGiftResp: wiretype end group for non-group") |
|
} |
|
if fieldNum <= 0 { |
|
return fmt.Errorf("proto: GiftAddFreeGiftResp: illegal tag %d (wire type %d)", fieldNum, wire) |
|
} |
|
switch fieldNum { |
|
case 1: |
|
if wireType != 0 { |
|
return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) |
|
} |
|
m.Code = 0 |
|
for shift := uint(0); ; shift += 7 { |
|
if shift >= 64 { |
|
return ErrIntOverflowGift |
|
} |
|
if iNdEx >= l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
b := dAtA[iNdEx] |
|
iNdEx++ |
|
m.Code |= (int64(b) & 0x7F) << shift |
|
if b < 0x80 { |
|
break |
|
} |
|
} |
|
case 2: |
|
if wireType != 2 { |
|
return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) |
|
} |
|
var stringLen uint64 |
|
for shift := uint(0); ; shift += 7 { |
|
if shift >= 64 { |
|
return ErrIntOverflowGift |
|
} |
|
if iNdEx >= l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
b := dAtA[iNdEx] |
|
iNdEx++ |
|
stringLen |= (uint64(b) & 0x7F) << shift |
|
if b < 0x80 { |
|
break |
|
} |
|
} |
|
intStringLen := int(stringLen) |
|
if intStringLen < 0 { |
|
return ErrInvalidLengthGift |
|
} |
|
postIndex := iNdEx + intStringLen |
|
if postIndex > l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
m.Msg = string(dAtA[iNdEx:postIndex]) |
|
iNdEx = postIndex |
|
case 3: |
|
if wireType != 2 { |
|
return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) |
|
} |
|
var msglen int |
|
for shift := uint(0); ; shift += 7 { |
|
if shift >= 64 { |
|
return ErrIntOverflowGift |
|
} |
|
if iNdEx >= l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
b := dAtA[iNdEx] |
|
iNdEx++ |
|
msglen |= (int(b) & 0x7F) << shift |
|
if b < 0x80 { |
|
break |
|
} |
|
} |
|
if msglen < 0 { |
|
return ErrInvalidLengthGift |
|
} |
|
postIndex := iNdEx + msglen |
|
if postIndex > l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
if m.Data == nil { |
|
m.Data = &GiftAddFreeGiftResp_Data{} |
|
} |
|
if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
|
return err |
|
} |
|
iNdEx = postIndex |
|
default: |
|
iNdEx = preIndex |
|
skippy, err := skipGift(dAtA[iNdEx:]) |
|
if err != nil { |
|
return err |
|
} |
|
if skippy < 0 { |
|
return ErrInvalidLengthGift |
|
} |
|
if (iNdEx + skippy) > l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
iNdEx += skippy |
|
} |
|
} |
|
|
|
if iNdEx > l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
return nil |
|
} |
|
func (m *GiftAddFreeGiftResp_Data) 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 ErrIntOverflowGift |
|
} |
|
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: Data: wiretype end group for non-group") |
|
} |
|
if fieldNum <= 0 { |
|
return fmt.Errorf("proto: Data: illegal tag %d (wire type %d)", fieldNum, wire) |
|
} |
|
switch fieldNum { |
|
case 1: |
|
if wireType != 0 { |
|
return fmt.Errorf("proto: wrong wireType = %d for field BagId", wireType) |
|
} |
|
m.BagId = 0 |
|
for shift := uint(0); ; shift += 7 { |
|
if shift >= 64 { |
|
return ErrIntOverflowGift |
|
} |
|
if iNdEx >= l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
b := dAtA[iNdEx] |
|
iNdEx++ |
|
m.BagId |= (int64(b) & 0x7F) << shift |
|
if b < 0x80 { |
|
break |
|
} |
|
} |
|
default: |
|
iNdEx = preIndex |
|
skippy, err := skipGift(dAtA[iNdEx:]) |
|
if err != nil { |
|
return err |
|
} |
|
if skippy < 0 { |
|
return ErrInvalidLengthGift |
|
} |
|
if (iNdEx + skippy) > l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
iNdEx += skippy |
|
} |
|
} |
|
|
|
if iNdEx > l { |
|
return io.ErrUnexpectedEOF |
|
} |
|
return nil |
|
} |
|
func skipGift(dAtA []byte) (n int, err error) { |
|
l := len(dAtA) |
|
iNdEx := 0 |
|
for iNdEx < l { |
|
var wire uint64 |
|
for shift := uint(0); ; shift += 7 { |
|
if shift >= 64 { |
|
return 0, ErrIntOverflowGift |
|
} |
|
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, ErrIntOverflowGift |
|
} |
|
if iNdEx >= l { |
|
return 0, io.ErrUnexpectedEOF |
|
} |
|
iNdEx++ |
|
if dAtA[iNdEx-1] < 0x80 { |
|
break |
|
} |
|
} |
|
return iNdEx, nil |
|
case 1: |
|
iNdEx += 8 |
|
return iNdEx, nil |
|
case 2: |
|
var length int |
|
for shift := uint(0); ; shift += 7 { |
|
if shift >= 64 { |
|
return 0, ErrIntOverflowGift |
|
} |
|
if iNdEx >= l { |
|
return 0, io.ErrUnexpectedEOF |
|
} |
|
b := dAtA[iNdEx] |
|
iNdEx++ |
|
length |= (int(b) & 0x7F) << shift |
|
if b < 0x80 { |
|
break |
|
} |
|
} |
|
iNdEx += length |
|
if length < 0 { |
|
return 0, ErrInvalidLengthGift |
|
} |
|
return iNdEx, nil |
|
case 3: |
|
for { |
|
var innerWire uint64 |
|
var start int = iNdEx |
|
for shift := uint(0); ; shift += 7 { |
|
if shift >= 64 { |
|
return 0, ErrIntOverflowGift |
|
} |
|
if iNdEx >= l { |
|
return 0, io.ErrUnexpectedEOF |
|
} |
|
b := dAtA[iNdEx] |
|
iNdEx++ |
|
innerWire |= (uint64(b) & 0x7F) << shift |
|
if b < 0x80 { |
|
break |
|
} |
|
} |
|
innerWireType := int(innerWire & 0x7) |
|
if innerWireType == 4 { |
|
break |
|
} |
|
next, err := skipGift(dAtA[start:]) |
|
if err != nil { |
|
return 0, err |
|
} |
|
iNdEx = start + next |
|
} |
|
return iNdEx, nil |
|
case 4: |
|
return iNdEx, nil |
|
case 5: |
|
iNdEx += 4 |
|
return iNdEx, nil |
|
default: |
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType) |
|
} |
|
} |
|
panic("unreachable") |
|
} |
|
|
|
var ( |
|
ErrInvalidLengthGift = fmt.Errorf("proto: negative length found during unmarshaling") |
|
ErrIntOverflowGift = fmt.Errorf("proto: integer overflow") |
|
) |
|
|
|
func init() { proto.RegisterFile("v1/Gift.proto", fileDescriptor_Gift_7d77e02c48c2917b) } |
|
|
|
var fileDescriptor_Gift_7d77e02c48c2917b = []byte{ |
|
// 365 bytes of a gzipped FileDescriptorProto |
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0xbd, 0x6e, 0xe2, 0x40, |
|
0x10, 0x66, 0xb1, 0x31, 0x30, 0xdc, 0x35, 0x7b, 0x8d, 0xe1, 0x90, 0x0d, 0x54, 0x5c, 0x71, 0x46, |
|
0x90, 0x07, 0x88, 0x82, 0xa2, 0xfc, 0x74, 0xd1, 0x96, 0x69, 0xa2, 0x35, 0x5e, 0x36, 0x96, 0x30, |
|
0x06, 0x63, 0xa3, 0x3c, 0x46, 0x9e, 0x27, 0x4f, 0x90, 0x92, 0x32, 0x4a, 0x61, 0x45, 0xd0, 0xf9, |
|
0x29, 0xa2, 0x1d, 0x5b, 0x46, 0xca, 0x5f, 0xf3, 0xed, 0xcc, 0x37, 0x9a, 0x6f, 0xbe, 0x19, 0x2d, |
|
0xfc, 0xde, 0x8e, 0x47, 0x97, 0xfe, 0x3c, 0x76, 0x56, 0x51, 0x18, 0x87, 0xb4, 0x2e, 0x55, 0xbc, |
|
0x1d, 0x77, 0xfe, 0x4b, 0x3f, 0xbe, 0x4f, 0x5c, 0x67, 0x16, 0x06, 0x23, 0x19, 0xca, 0x70, 0x84, |
|
0x75, 0x37, 0x99, 0x63, 0x86, 0x09, 0x46, 0x79, 0xdf, 0xe0, 0x95, 0x00, 0x55, 0x32, 0x67, 0x9e, |
|
0x77, 0x11, 0x09, 0xa1, 0x42, 0x26, 0xd6, 0xb4, 0x0d, 0x5a, 0xe2, 0x7b, 0x26, 0xe9, 0x91, 0xa1, |
|
0x36, 0xad, 0x67, 0xa9, 0xad, 0x52, 0xa6, 0x80, 0x0e, 0xc0, 0x50, 0xb3, 0x7c, 0xcf, 0xac, 0x62, |
|
0x15, 0xb2, 0xd4, 0x2e, 0x18, 0x56, 0xbc, 0xaa, 0x7d, 0x99, 0x04, 0xa6, 0x76, 0x6c, 0x5f, 0x26, |
|
0x01, 0x53, 0x40, 0x87, 0xd0, 0x10, 0x0f, 0x2b, 0x3f, 0x12, 0x3c, 0x36, 0x75, 0xac, 0xff, 0xca, |
|
0x52, 0xbb, 0xe4, 0x58, 0x19, 0xd1, 0x2e, 0xe8, 0xb3, 0xd0, 0x13, 0x66, 0xad, 0x47, 0x86, 0xcd, |
|
0x69, 0x23, 0x4b, 0x6d, 0xcc, 0x19, 0xa2, 0xb2, 0x31, 0xe3, 0x8b, 0x85, 0x88, 0x4c, 0x03, 0xeb, |
|
0x68, 0x23, 0x67, 0x58, 0xf1, 0x0e, 0x9e, 0x08, 0xfc, 0xf9, 0xb4, 0xdc, 0x66, 0x55, 0x2a, 0xe7, |
|
0xeb, 0x7d, 0x54, 0x6e, 0x83, 0x16, 0x6c, 0x24, 0x6e, 0xd7, 0xcc, 0xcd, 0x07, 0x1b, 0xc9, 0x14, |
|
0xd0, 0x53, 0xd0, 0x3d, 0x1e, 0x73, 0x5c, 0xac, 0x35, 0xe9, 0x3b, 0xc5, 0xd1, 0x9d, 0x2f, 0x86, |
|
0x38, 0xe7, 0x3c, 0xe6, 0xb9, 0xb6, 0x6a, 0x61, 0x88, 0x9d, 0x7f, 0xa0, 0x2b, 0x9e, 0xf6, 0xc1, |
|
0x70, 0xb9, 0xbc, 0x2b, 0x4f, 0x8c, 0xee, 0x73, 0x86, 0xd5, 0x5c, 0x2e, 0xaf, 0xbd, 0xc9, 0x0d, |
|
0xe8, 0x4a, 0x8b, 0x5e, 0x41, 0x8b, 0x1f, 0xa5, 0xe9, 0xdf, 0xef, 0x87, 0xae, 0x3b, 0xdd, 0x9f, |
|
0x1c, 0x4d, 0xbb, 0xcf, 0x7b, 0x8b, 0xec, 0xf6, 0x16, 0x79, 0xdb, 0x5b, 0xe4, 0xf1, 0x60, 0x55, |
|
0x76, 0x07, 0xab, 0xf2, 0x72, 0xb0, 0x2a, 0xb7, 0xd5, 0xed, 0xd8, 0x35, 0xf0, 0x43, 0x9c, 0xbc, |
|
0x07, 0x00, 0x00, 0xff, 0xff, 0x49, 0xd7, 0x75, 0x4e, 0x59, 0x02, 0x00, 0x00, |
|
}
|
|
|