// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: users.proto package user import ( context "context" fmt "fmt" proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" 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 type User struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` CreatedAt string `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt string `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` Avatar string `protobuf:"bytes,5,opt,name=avatar,proto3" json:"avatar,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *User) Reset() { *m = User{} } func (m *User) String() string { return proto.CompactTextString(m) } func (*User) ProtoMessage() {} func (*User) Descriptor() ([]byte, []int) { return fileDescriptor_030765f334c86cea, []int{0} } func (m *User) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_User.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 *User) XXX_Merge(src proto.Message) { xxx_messageInfo_User.Merge(m, src) } func (m *User) XXX_Size() int { return m.Size() } func (m *User) XXX_DiscardUnknown() { xxx_messageInfo_User.DiscardUnknown(m) } var xxx_messageInfo_User proto.InternalMessageInfo func (m *User) GetId() uint64 { if m != nil { return m.Id } return 0 } func (m *User) GetCreatedAt() string { if m != nil { return m.CreatedAt } return "" } func (m *User) GetUpdatedAt() string { if m != nil { return m.UpdatedAt } return "" } func (m *User) GetName() string { if m != nil { return m.Name } return "" } func (m *User) GetAvatar() string { if m != nil { return m.Avatar } return "" } type UserRequest struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *UserRequest) Reset() { *m = UserRequest{} } func (m *UserRequest) String() string { return proto.CompactTextString(m) } func (*UserRequest) ProtoMessage() {} func (*UserRequest) Descriptor() ([]byte, []int) { return fileDescriptor_030765f334c86cea, []int{1} } func (m *UserRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *UserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_UserRequest.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 *UserRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_UserRequest.Merge(m, src) } func (m *UserRequest) XXX_Size() int { return m.Size() } func (m *UserRequest) XXX_DiscardUnknown() { xxx_messageInfo_UserRequest.DiscardUnknown(m) } var xxx_messageInfo_UserRequest proto.InternalMessageInfo func (m *UserRequest) GetToken() string { if m != nil { return m.Token } return "" } type UserResponse struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` Data *User `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *UserResponse) Reset() { *m = UserResponse{} } func (m *UserResponse) String() string { return proto.CompactTextString(m) } func (*UserResponse) ProtoMessage() {} func (*UserResponse) Descriptor() ([]byte, []int) { return fileDescriptor_030765f334c86cea, []int{2} } func (m *UserResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *UserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_UserResponse.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 *UserResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_UserResponse.Merge(m, src) } func (m *UserResponse) XXX_Size() int { return m.Size() } func (m *UserResponse) XXX_DiscardUnknown() { xxx_messageInfo_UserResponse.DiscardUnknown(m) } var xxx_messageInfo_UserResponse proto.InternalMessageInfo func (m *UserResponse) GetCode() int32 { if m != nil { return m.Code } return 0 } func (m *UserResponse) GetMessage() string { if m != nil { return m.Message } return "" } func (m *UserResponse) GetData() *User { if m != nil { return m.Data } return nil } func init() { proto.RegisterType((*User)(nil), "user.User") proto.RegisterType((*UserRequest)(nil), "user.UserRequest") proto.RegisterType((*UserResponse)(nil), "user.UserResponse") } func init() { proto.RegisterFile("users.proto", fileDescriptor_030765f334c86cea) } var fileDescriptor_030765f334c86cea = []byte{ // 268 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x90, 0xcd, 0x4a, 0xc4, 0x30, 0x10, 0xc7, 0x37, 0x6b, 0xba, 0x4b, 0xa7, 0x22, 0x3a, 0x88, 0x14, 0xc1, 0xb2, 0xd4, 0xcb, 0x9e, 0x7a, 0xa8, 0x4f, 0x50, 0x2f, 0xde, 0x2b, 0xde, 0x04, 0x89, 0xcd, 0x20, 0x45, 0xb6, 0xad, 0x49, 0xba, 0x67, 0x1f, 0xc3, 0x47, 0xf2, 0xe8, 0x23, 0x48, 0x7d, 0x11, 0xc9, 0xa4, 0x0b, 0x7b, 0x9b, 0xff, 0x07, 0xc9, 0x6f, 0x06, 0x92, 0xd1, 0x92, 0xb1, 0xc5, 0x60, 0x7a, 0xd7, 0xa3, 0xf4, 0x22, 0xff, 0x14, 0x20, 0x9f, 0x2c, 0x19, 0x3c, 0x83, 0x65, 0xab, 0x53, 0xb1, 0x11, 0x5b, 0x59, 0x2f, 0x5b, 0x8d, 0x37, 0x00, 0x8d, 0x21, 0xe5, 0x48, 0xbf, 0x28, 0x97, 0x2e, 0x37, 0x62, 0x1b, 0xd7, 0xf1, 0xec, 0x54, 0xce, 0xc7, 0xe3, 0xa0, 0x0f, 0xf1, 0x49, 0x88, 0x67, 0xa7, 0x72, 0x88, 0x20, 0x3b, 0xb5, 0xa3, 0x54, 0x72, 0xc0, 0x33, 0x5e, 0xc1, 0x4a, 0xed, 0x95, 0x53, 0x26, 0x8d, 0xd8, 0x9d, 0x55, 0x7e, 0x0b, 0x89, 0x27, 0xa8, 0xe9, 0x63, 0x24, 0xeb, 0xf0, 0x12, 0x22, 0xd7, 0xbf, 0x53, 0xc7, 0x2c, 0x71, 0x1d, 0x44, 0xfe, 0x0c, 0xa7, 0xa1, 0x64, 0x87, 0xbe, 0xb3, 0xe4, 0x3f, 0x68, 0x7a, 0x4d, 0x5c, 0x8a, 0x6a, 0x9e, 0x31, 0x85, 0xf5, 0x8e, 0xac, 0x55, 0x6f, 0x34, 0xf3, 0x1e, 0x24, 0x66, 0x20, 0xb5, 0x72, 0x8a, 0x39, 0x93, 0x12, 0x0a, 0xbf, 0x7a, 0xc1, 0xef, 0xb1, 0x5f, 0x56, 0x01, 0xe1, 0x91, 0xcc, 0xbe, 0x6d, 0x08, 0x4b, 0x58, 0x3f, 0x90, 0xe3, 0xb3, 0x5c, 0x1c, 0x75, 0x03, 0xe0, 0x35, 0x1e, 0x5b, 0x01, 0x27, 0x5f, 0xdc, 0x9f, 0x7f, 0x4f, 0x99, 0xf8, 0x99, 0x32, 0xf1, 0x3b, 0x65, 0xe2, 0xeb, 0x2f, 0x5b, 0xbc, 0xae, 0xf8, 0xce, 0x77, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x87, 0x34, 0x3f, 0xe3, 0x76, 0x01, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 // UserServiceClient is the client API for UserService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type UserServiceClient interface { GetUser(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error) } type userServiceClient struct { cc *grpc.ClientConn } func NewUserServiceClient(cc *grpc.ClientConn) UserServiceClient { return &userServiceClient{cc} } func (c *userServiceClient) GetUser(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error) { out := new(UserResponse) err := c.cc.Invoke(ctx, "/user.UserService/GetUser", in, out, opts...) if err != nil { return nil, err } return out, nil } // UserServiceServer is the server API for UserService service. type UserServiceServer interface { GetUser(context.Context, *UserRequest) (*UserResponse, error) } // UnimplementedUserServiceServer can be embedded to have forward compatible implementations. type UnimplementedUserServiceServer struct { } func (*UnimplementedUserServiceServer) GetUser(ctx context.Context, req *UserRequest) (*UserResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented") } func RegisterUserServiceServer(s *grpc.Server, srv UserServiceServer) { s.RegisterService(&_UserService_serviceDesc, srv) } func _UserService_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UserRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(UserServiceServer).GetUser(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/user.UserService/GetUser", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(UserServiceServer).GetUser(ctx, req.(*UserRequest)) } return interceptor(ctx, in, info, handler) } var _UserService_serviceDesc = grpc.ServiceDesc{ ServiceName: "user.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetUser", Handler: _UserService_GetUser_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "users.proto", } func (m *User) 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 *User) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *User) 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.Avatar) > 0 { i -= len(m.Avatar) copy(dAtA[i:], m.Avatar) i = encodeVarintUsers(dAtA, i, uint64(len(m.Avatar))) i-- dAtA[i] = 0x2a } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) i = encodeVarintUsers(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0x22 } if len(m.UpdatedAt) > 0 { i -= len(m.UpdatedAt) copy(dAtA[i:], m.UpdatedAt) i = encodeVarintUsers(dAtA, i, uint64(len(m.UpdatedAt))) i-- dAtA[i] = 0x1a } if len(m.CreatedAt) > 0 { i -= len(m.CreatedAt) copy(dAtA[i:], m.CreatedAt) i = encodeVarintUsers(dAtA, i, uint64(len(m.CreatedAt))) i-- dAtA[i] = 0x12 } if m.Id != 0 { i = encodeVarintUsers(dAtA, i, uint64(m.Id)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *UserRequest) 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 *UserRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *UserRequest) 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.Token) > 0 { i -= len(m.Token) copy(dAtA[i:], m.Token) i = encodeVarintUsers(dAtA, i, uint64(len(m.Token))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *UserResponse) 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 *UserResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *UserResponse) 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.Data != nil { { size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintUsers(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } if len(m.Message) > 0 { i -= len(m.Message) copy(dAtA[i:], m.Message) i = encodeVarintUsers(dAtA, i, uint64(len(m.Message))) i-- dAtA[i] = 0x12 } if m.Code != 0 { i = encodeVarintUsers(dAtA, i, uint64(m.Code)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func encodeVarintUsers(dAtA []byte, offset int, v uint64) int { offset -= sovUsers(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *User) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Id != 0 { n += 1 + sovUsers(uint64(m.Id)) } l = len(m.CreatedAt) if l > 0 { n += 1 + l + sovUsers(uint64(l)) } l = len(m.UpdatedAt) if l > 0 { n += 1 + l + sovUsers(uint64(l)) } l = len(m.Name) if l > 0 { n += 1 + l + sovUsers(uint64(l)) } l = len(m.Avatar) if l > 0 { n += 1 + l + sovUsers(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *UserRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Token) if l > 0 { n += 1 + l + sovUsers(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *UserResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Code != 0 { n += 1 + sovUsers(uint64(m.Code)) } l = len(m.Message) if l > 0 { n += 1 + l + sovUsers(uint64(l)) } if m.Data != nil { l = m.Data.Size() n += 1 + l + sovUsers(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func sovUsers(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozUsers(x uint64) (n int) { return sovUsers(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *User) 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 ErrIntOverflowUsers } 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: User: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: User: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowUsers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Id |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowUsers } 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 ErrInvalidLengthUsers } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthUsers } if postIndex > l { return io.ErrUnexpectedEOF } m.CreatedAt = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowUsers } 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 ErrInvalidLengthUsers } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthUsers } if postIndex > l { return io.ErrUnexpectedEOF } m.UpdatedAt = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowUsers } 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 ErrInvalidLengthUsers } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthUsers } if postIndex > l { return io.ErrUnexpectedEOF } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Avatar", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowUsers } 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 ErrInvalidLengthUsers } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthUsers } if postIndex > l { return io.ErrUnexpectedEOF } m.Avatar = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipUsers(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthUsers } 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 *UserRequest) 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 ErrIntOverflowUsers } 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: UserRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UserRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowUsers } 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 ErrInvalidLengthUsers } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthUsers } if postIndex > l { return io.ErrUnexpectedEOF } m.Token = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipUsers(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthUsers } 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 *UserResponse) 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 ErrIntOverflowUsers } 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: UserResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UserResponse: 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 ErrIntOverflowUsers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Code |= int32(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowUsers } 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 ErrInvalidLengthUsers } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthUsers } if postIndex > l { return io.ErrUnexpectedEOF } m.Message = 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 ErrIntOverflowUsers } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthUsers } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthUsers } if postIndex > l { return io.ErrUnexpectedEOF } if m.Data == nil { m.Data = &User{} } if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipUsers(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthUsers } 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 skipUsers(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, ErrIntOverflowUsers } 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, ErrIntOverflowUsers } 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, ErrIntOverflowUsers } 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, ErrInvalidLengthUsers } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupUsers } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthUsers } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthUsers = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowUsers = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupUsers = fmt.Errorf("proto: unexpected end of group") )