mirror of
https://gitee.com/johng/gf.git
synced 2024-12-04 21:28:22 +08:00
1336 lines
32 KiB
Go
1336 lines
32 KiB
Go
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: protocol/user/user.proto
|
|
|
|
package user
|
|
|
|
import (
|
|
context "context"
|
|
fmt "fmt"
|
|
_ "github.com/gogo/protobuf/gogoproto"
|
|
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 InsertReq struct {
|
|
Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty" v:"required#Please input user name."`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *InsertReq) Reset() { *m = InsertReq{} }
|
|
func (m *InsertReq) String() string { return proto.CompactTextString(m) }
|
|
func (*InsertReq) ProtoMessage() {}
|
|
func (*InsertReq) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_2a1d51345ecfe4e5, []int{0}
|
|
}
|
|
func (m *InsertReq) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *InsertReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_InsertReq.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 *InsertReq) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_InsertReq.Merge(m, src)
|
|
}
|
|
func (m *InsertReq) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *InsertReq) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_InsertReq.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_InsertReq proto.InternalMessageInfo
|
|
|
|
func (m *InsertReq) GetName() string {
|
|
if m != nil {
|
|
return m.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type InsertRes struct {
|
|
Id int32 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *InsertRes) Reset() { *m = InsertRes{} }
|
|
func (m *InsertRes) String() string { return proto.CompactTextString(m) }
|
|
func (*InsertRes) ProtoMessage() {}
|
|
func (*InsertRes) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_2a1d51345ecfe4e5, []int{1}
|
|
}
|
|
func (m *InsertRes) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *InsertRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_InsertRes.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 *InsertRes) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_InsertRes.Merge(m, src)
|
|
}
|
|
func (m *InsertRes) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *InsertRes) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_InsertRes.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_InsertRes proto.InternalMessageInfo
|
|
|
|
func (m *InsertRes) GetId() int32 {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type QueryReq struct {
|
|
Id int32 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty" v:"min:1#User id is required for querying."`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *QueryReq) Reset() { *m = QueryReq{} }
|
|
func (m *QueryReq) String() string { return proto.CompactTextString(m) }
|
|
func (*QueryReq) ProtoMessage() {}
|
|
func (*QueryReq) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_2a1d51345ecfe4e5, []int{2}
|
|
}
|
|
func (m *QueryReq) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *QueryReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_QueryReq.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 *QueryReq) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_QueryReq.Merge(m, src)
|
|
}
|
|
func (m *QueryReq) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *QueryReq) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_QueryReq.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_QueryReq proto.InternalMessageInfo
|
|
|
|
func (m *QueryReq) GetId() int32 {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type QueryRes struct {
|
|
Id int32 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"`
|
|
Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *QueryRes) Reset() { *m = QueryRes{} }
|
|
func (m *QueryRes) String() string { return proto.CompactTextString(m) }
|
|
func (*QueryRes) ProtoMessage() {}
|
|
func (*QueryRes) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_2a1d51345ecfe4e5, []int{3}
|
|
}
|
|
func (m *QueryRes) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *QueryRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_QueryRes.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 *QueryRes) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_QueryRes.Merge(m, src)
|
|
}
|
|
func (m *QueryRes) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *QueryRes) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_QueryRes.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_QueryRes proto.InternalMessageInfo
|
|
|
|
func (m *QueryRes) GetId() int32 {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *QueryRes) GetName() string {
|
|
if m != nil {
|
|
return m.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type DeleteReq struct {
|
|
Id int32 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty" v:"min:1#User id is required for deleting."`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *DeleteReq) Reset() { *m = DeleteReq{} }
|
|
func (m *DeleteReq) String() string { return proto.CompactTextString(m) }
|
|
func (*DeleteReq) ProtoMessage() {}
|
|
func (*DeleteReq) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_2a1d51345ecfe4e5, []int{4}
|
|
}
|
|
func (m *DeleteReq) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *DeleteReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_DeleteReq.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 *DeleteReq) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_DeleteReq.Merge(m, src)
|
|
}
|
|
func (m *DeleteReq) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *DeleteReq) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_DeleteReq.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_DeleteReq proto.InternalMessageInfo
|
|
|
|
func (m *DeleteReq) GetId() int32 {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type DeleteRes struct {
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *DeleteRes) Reset() { *m = DeleteRes{} }
|
|
func (m *DeleteRes) String() string { return proto.CompactTextString(m) }
|
|
func (*DeleteRes) ProtoMessage() {}
|
|
func (*DeleteRes) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_2a1d51345ecfe4e5, []int{5}
|
|
}
|
|
func (m *DeleteRes) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *DeleteRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_DeleteRes.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 *DeleteRes) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_DeleteRes.Merge(m, src)
|
|
}
|
|
func (m *DeleteRes) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *DeleteRes) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_DeleteRes.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_DeleteRes proto.InternalMessageInfo
|
|
|
|
func init() {
|
|
proto.RegisterType((*InsertReq)(nil), "user.InsertReq")
|
|
proto.RegisterType((*InsertRes)(nil), "user.InsertRes")
|
|
proto.RegisterType((*QueryReq)(nil), "user.QueryReq")
|
|
proto.RegisterType((*QueryRes)(nil), "user.QueryRes")
|
|
proto.RegisterType((*DeleteReq)(nil), "user.DeleteReq")
|
|
proto.RegisterType((*DeleteRes)(nil), "user.DeleteRes")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("protocol/user/user.proto", fileDescriptor_2a1d51345ecfe4e5) }
|
|
|
|
var fileDescriptor_2a1d51345ecfe4e5 = []byte{
|
|
// 345 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x52, 0xc1, 0x4a, 0xc3, 0x40,
|
|
0x10, 0x6d, 0x4a, 0x5b, 0xec, 0x8a, 0x15, 0xf6, 0x54, 0x22, 0xa4, 0xcb, 0xd6, 0x43, 0xc5, 0x9a,
|
|
0xa0, 0xde, 0x8a, 0x20, 0x14, 0x2f, 0x41, 0x11, 0x2d, 0x78, 0xf1, 0xd6, 0x36, 0xd3, 0xb8, 0xd0,
|
|
0x64, 0xdb, 0xdd, 0xa4, 0xe0, 0x47, 0x78, 0xf7, 0x93, 0x3c, 0xfa, 0x05, 0x45, 0xea, 0x1f, 0xf4,
|
|
0x0b, 0x64, 0x27, 0x6d, 0x82, 0xf5, 0xe6, 0x25, 0xcc, 0x9b, 0x99, 0xf7, 0x5e, 0xde, 0x24, 0xa4,
|
|
0x39, 0x53, 0x32, 0x91, 0x63, 0x39, 0xf5, 0x52, 0x0d, 0x0a, 0x1f, 0x2e, 0xb6, 0x68, 0xc5, 0xd4,
|
|
0xf6, 0x59, 0x28, 0x92, 0x97, 0x74, 0xe4, 0x8e, 0x65, 0xe4, 0x85, 0x32, 0x94, 0x1e, 0x0e, 0x47,
|
|
0xe9, 0x04, 0x11, 0x02, 0xac, 0x32, 0x12, 0xf7, 0x49, 0xdd, 0x8f, 0x35, 0xa8, 0x64, 0x00, 0x73,
|
|
0x7a, 0x45, 0x2a, 0xf7, 0xc3, 0x08, 0x9a, 0x16, 0xb3, 0x3a, 0xf5, 0x7e, 0x67, 0xbd, 0x6c, 0x1d,
|
|
0x2f, 0x7a, 0x5c, 0xc1, 0x3c, 0x15, 0x0a, 0x82, 0xf6, 0xc3, 0x14, 0x86, 0x1a, 0x98, 0x88, 0x67,
|
|
0x69, 0xc2, 0x8c, 0x19, 0x8b, 0x87, 0x11, 0xb8, 0x7c, 0x80, 0x2c, 0x7e, 0x54, 0x48, 0x69, 0xda,
|
|
0x20, 0x65, 0x3f, 0x40, 0xa1, 0xea, 0xa0, 0xec, 0x07, 0xfc, 0x96, 0xec, 0x3d, 0xa6, 0xa0, 0x5e,
|
|
0x8d, 0xcd, 0x75, 0x31, 0xeb, 0x7b, 0xeb, 0x65, 0xeb, 0x74, 0xd1, 0xe3, 0x91, 0x88, 0x7b, 0xe7,
|
|
0xed, 0x27, 0x23, 0x2a, 0x02, 0x26, 0x34, 0xdb, 0xba, 0xb2, 0x89, 0x54, 0x6c, 0x6e, 0xa8, 0x22,
|
|
0x0e, 0x5d, 0x8e, 0x62, 0x6e, 0x2e, 0xf6, 0xc7, 0x88, 0xd2, 0x4d, 0x86, 0xb2, 0xc9, 0xb0, 0x79,
|
|
0xb3, 0x3b, 0x52, 0xbf, 0x81, 0x29, 0x24, 0xf0, 0x3f, 0xf7, 0xc0, 0x70, 0x0b, 0xf7, 0xfd, 0x42,
|
|
0x4d, 0x5f, 0xbc, 0x59, 0xa4, 0x62, 0x78, 0xb4, 0x4b, 0x6a, 0x59, 0x7a, 0x7a, 0xe8, 0xe2, 0x47,
|
|
0xc9, 0xcf, 0x6a, 0xef, 0x34, 0x34, 0x2f, 0xd1, 0x13, 0x52, 0xc5, 0x04, 0xb4, 0x91, 0xcd, 0xb6,
|
|
0xb7, 0xb1, 0x7f, 0x63, 0xb3, 0xda, 0x25, 0xb5, 0xcc, 0x6e, 0x2b, 0x9c, 0x47, 0xb1, 0x77, 0x1a,
|
|
0x9a, 0x97, 0xfa, 0xad, 0x8f, 0x95, 0x63, 0x7d, 0xae, 0x1c, 0xeb, 0x6b, 0xe5, 0x58, 0xef, 0xdf,
|
|
0x4e, 0xe9, 0xf9, 0x20, 0xff, 0x01, 0xcc, 0xf2, 0xa8, 0x86, 0xf0, 0xf2, 0x27, 0x00, 0x00, 0xff,
|
|
0xff, 0xb9, 0xf8, 0x21, 0xb8, 0x48, 0x02, 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
|
|
|
|
// UserClient is the client API for User service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
type UserClient interface {
|
|
Insert(ctx context.Context, in *InsertReq, opts ...grpc.CallOption) (*InsertRes, error)
|
|
Query(ctx context.Context, in *QueryReq, opts ...grpc.CallOption) (*QueryRes, error)
|
|
Delete(ctx context.Context, in *DeleteReq, opts ...grpc.CallOption) (*DeleteRes, error)
|
|
}
|
|
|
|
type userClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewUserClient(cc *grpc.ClientConn) UserClient {
|
|
return &userClient{cc}
|
|
}
|
|
|
|
func (c *userClient) Insert(ctx context.Context, in *InsertReq, opts ...grpc.CallOption) (*InsertRes, error) {
|
|
out := new(InsertRes)
|
|
err := c.cc.Invoke(ctx, "/user.User/Insert", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userClient) Query(ctx context.Context, in *QueryReq, opts ...grpc.CallOption) (*QueryRes, error) {
|
|
out := new(QueryRes)
|
|
err := c.cc.Invoke(ctx, "/user.User/Query", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *userClient) Delete(ctx context.Context, in *DeleteReq, opts ...grpc.CallOption) (*DeleteRes, error) {
|
|
out := new(DeleteRes)
|
|
err := c.cc.Invoke(ctx, "/user.User/Delete", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// UserServer is the server API for User service.
|
|
type UserServer interface {
|
|
Insert(context.Context, *InsertReq) (*InsertRes, error)
|
|
Query(context.Context, *QueryReq) (*QueryRes, error)
|
|
Delete(context.Context, *DeleteReq) (*DeleteRes, error)
|
|
}
|
|
|
|
// UnimplementedUserServer can be embedded to have forward compatible implementations.
|
|
type UnimplementedUserServer struct {
|
|
}
|
|
|
|
func (*UnimplementedUserServer) Insert(ctx context.Context, req *InsertReq) (*InsertRes, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Insert not implemented")
|
|
}
|
|
func (*UnimplementedUserServer) Query(ctx context.Context, req *QueryReq) (*QueryRes, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Query not implemented")
|
|
}
|
|
func (*UnimplementedUserServer) Delete(ctx context.Context, req *DeleteReq) (*DeleteRes, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
|
|
}
|
|
|
|
func RegisterUserServer(s *grpc.Server, srv UserServer) {
|
|
s.RegisterService(&_User_serviceDesc, srv)
|
|
}
|
|
|
|
func _User_Insert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(InsertReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServer).Insert(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/user.User/Insert",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServer).Insert(ctx, req.(*InsertReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _User_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(QueryReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServer).Query(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/user.User/Query",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServer).Query(ctx, req.(*QueryReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _User_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(UserServer).Delete(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/user.User/Delete",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(UserServer).Delete(ctx, req.(*DeleteReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _User_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "user.User",
|
|
HandlerType: (*UserServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Insert",
|
|
Handler: _User_Insert_Handler,
|
|
},
|
|
{
|
|
MethodName: "Query",
|
|
Handler: _User_Query_Handler,
|
|
},
|
|
{
|
|
MethodName: "Delete",
|
|
Handler: _User_Delete_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "protocol/user/user.proto",
|
|
}
|
|
|
|
func (m *InsertReq) 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 *InsertReq) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *InsertReq) 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.Name) > 0 {
|
|
i -= len(m.Name)
|
|
copy(dAtA[i:], m.Name)
|
|
i = encodeVarintUser(dAtA, i, uint64(len(m.Name)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *InsertRes) 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 *InsertRes) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *InsertRes) 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.Id != 0 {
|
|
i = encodeVarintUser(dAtA, i, uint64(m.Id))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *QueryReq) 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 *QueryReq) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *QueryReq) 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.Id != 0 {
|
|
i = encodeVarintUser(dAtA, i, uint64(m.Id))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *QueryRes) 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 *QueryRes) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *QueryRes) 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.Name) > 0 {
|
|
i -= len(m.Name)
|
|
copy(dAtA[i:], m.Name)
|
|
i = encodeVarintUser(dAtA, i, uint64(len(m.Name)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if m.Id != 0 {
|
|
i = encodeVarintUser(dAtA, i, uint64(m.Id))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *DeleteReq) 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 *DeleteReq) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *DeleteReq) 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.Id != 0 {
|
|
i = encodeVarintUser(dAtA, i, uint64(m.Id))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *DeleteRes) 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 *DeleteRes) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *DeleteRes) 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)
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func encodeVarintUser(dAtA []byte, offset int, v uint64) int {
|
|
offset -= sovUser(v)
|
|
base := offset
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return base
|
|
}
|
|
func (m *InsertReq) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.Name)
|
|
if l > 0 {
|
|
n += 1 + l + sovUser(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *InsertRes) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Id != 0 {
|
|
n += 1 + sovUser(uint64(m.Id))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *QueryReq) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Id != 0 {
|
|
n += 1 + sovUser(uint64(m.Id))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *QueryRes) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Id != 0 {
|
|
n += 1 + sovUser(uint64(m.Id))
|
|
}
|
|
l = len(m.Name)
|
|
if l > 0 {
|
|
n += 1 + l + sovUser(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *DeleteReq) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Id != 0 {
|
|
n += 1 + sovUser(uint64(m.Id))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *DeleteRes) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovUser(x uint64) (n int) {
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
}
|
|
func sozUser(x uint64) (n int) {
|
|
return sovUser(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *InsertReq) 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 ErrIntOverflowUser
|
|
}
|
|
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: InsertReq: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: InsertReq: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
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 ErrIntOverflowUser
|
|
}
|
|
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 ErrInvalidLengthUser
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthUser
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Name = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipUser(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthUser
|
|
}
|
|
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 *InsertRes) 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 ErrIntOverflowUser
|
|
}
|
|
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: InsertRes: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: InsertRes: 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 ErrIntOverflowUser
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Id |= int32(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipUser(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthUser
|
|
}
|
|
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 *QueryReq) 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 ErrIntOverflowUser
|
|
}
|
|
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: QueryReq: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: QueryReq: 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 ErrIntOverflowUser
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Id |= int32(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipUser(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthUser
|
|
}
|
|
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 *QueryRes) 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 ErrIntOverflowUser
|
|
}
|
|
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: QueryRes: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: QueryRes: 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 ErrIntOverflowUser
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Id |= int32(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
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 ErrIntOverflowUser
|
|
}
|
|
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 ErrInvalidLengthUser
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthUser
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Name = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipUser(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthUser
|
|
}
|
|
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 *DeleteReq) 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 ErrIntOverflowUser
|
|
}
|
|
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: DeleteReq: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: DeleteReq: 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 ErrIntOverflowUser
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Id |= int32(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipUser(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthUser
|
|
}
|
|
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 *DeleteRes) 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 ErrIntOverflowUser
|
|
}
|
|
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: DeleteRes: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: DeleteRes: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipUser(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return ErrInvalidLengthUser
|
|
}
|
|
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 skipUser(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, ErrIntOverflowUser
|
|
}
|
|
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, ErrIntOverflowUser
|
|
}
|
|
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, ErrIntOverflowUser
|
|
}
|
|
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, ErrInvalidLengthUser
|
|
}
|
|
iNdEx += length
|
|
case 3:
|
|
depth++
|
|
case 4:
|
|
if depth == 0 {
|
|
return 0, ErrUnexpectedEndOfGroupUser
|
|
}
|
|
depth--
|
|
case 5:
|
|
iNdEx += 4
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthUser
|
|
}
|
|
if depth == 0 {
|
|
return iNdEx, nil
|
|
}
|
|
}
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthUser = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowUser = fmt.Errorf("proto: integer overflow")
|
|
ErrUnexpectedEndOfGroupUser = fmt.Errorf("proto: unexpected end of group")
|
|
)
|