// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: api/v1/report.proto package v1 import ( context "context" fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" emptypb "google.golang.org/protobuf/types/known/emptypb" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" math_bits "math/bits" time "time" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf var _ = time.Kitchen // 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package // 举报 type Report struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` DocumentId int64 `protobuf:"varint,2,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` UserId int64 `protobuf:"varint,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Reason int32 `protobuf:"varint,4,opt,name=reason,proto3" json:"reason,omitempty"` Status bool `protobuf:"varint,5,opt,name=status,proto3" json:"status,omitempty"` CreatedAt *time.Time `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at,omitempty"` UpdatedAt *time.Time `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3,stdtime" json:"updated_at,omitempty"` DocumentTitle string `protobuf:"bytes,8,opt,name=document_title,json=documentTitle,proto3" json:"document_title,omitempty"` Remark string `protobuf:"bytes,9,opt,name=remark,proto3" json:"remark,omitempty"` Username string `protobuf:"bytes,10,opt,name=username,proto3" json:"username,omitempty"` } func (m *Report) Reset() { *m = Report{} } func (m *Report) String() string { return proto.CompactTextString(m) } func (*Report) ProtoMessage() {} func (*Report) Descriptor() ([]byte, []int) { return fileDescriptor_1e440702eea137dd, []int{0} } func (m *Report) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Report) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Report.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 *Report) XXX_Merge(src proto.Message) { xxx_messageInfo_Report.Merge(m, src) } func (m *Report) XXX_Size() int { return m.Size() } func (m *Report) XXX_DiscardUnknown() { xxx_messageInfo_Report.DiscardUnknown(m) } var xxx_messageInfo_Report proto.InternalMessageInfo func (m *Report) GetId() int64 { if m != nil { return m.Id } return 0 } func (m *Report) GetDocumentId() int64 { if m != nil { return m.DocumentId } return 0 } func (m *Report) GetUserId() int64 { if m != nil { return m.UserId } return 0 } func (m *Report) GetReason() int32 { if m != nil { return m.Reason } return 0 } func (m *Report) GetStatus() bool { if m != nil { return m.Status } return false } func (m *Report) GetCreatedAt() *time.Time { if m != nil { return m.CreatedAt } return nil } func (m *Report) GetUpdatedAt() *time.Time { if m != nil { return m.UpdatedAt } return nil } func (m *Report) GetDocumentTitle() string { if m != nil { return m.DocumentTitle } return "" } func (m *Report) GetRemark() string { if m != nil { return m.Remark } return "" } func (m *Report) GetUsername() string { if m != nil { return m.Username } return "" } // 删除举报请求 type DeleteReportRequest struct { Id []int64 `protobuf:"varint,1,rep,packed,name=id,proto3" json:"id,omitempty"` } func (m *DeleteReportRequest) Reset() { *m = DeleteReportRequest{} } func (m *DeleteReportRequest) String() string { return proto.CompactTextString(m) } func (*DeleteReportRequest) ProtoMessage() {} func (*DeleteReportRequest) Descriptor() ([]byte, []int) { return fileDescriptor_1e440702eea137dd, []int{1} } func (m *DeleteReportRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *DeleteReportRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_DeleteReportRequest.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 *DeleteReportRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_DeleteReportRequest.Merge(m, src) } func (m *DeleteReportRequest) XXX_Size() int { return m.Size() } func (m *DeleteReportRequest) XXX_DiscardUnknown() { xxx_messageInfo_DeleteReportRequest.DiscardUnknown(m) } var xxx_messageInfo_DeleteReportRequest proto.InternalMessageInfo func (m *DeleteReportRequest) GetId() []int64 { if m != nil { return m.Id } return nil } // 举报列表请求 type ListReportRequest struct { Page int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` Size_ int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` Wd string `protobuf:"bytes,3,opt,name=wd,proto3" json:"wd,omitempty"` Field []string `protobuf:"bytes,4,rep,name=field,proto3" json:"field,omitempty"` Order string `protobuf:"bytes,5,opt,name=order,proto3" json:"order,omitempty"` Status []bool `protobuf:"varint,6,rep,packed,name=status,proto3" json:"status,omitempty"` } func (m *ListReportRequest) Reset() { *m = ListReportRequest{} } func (m *ListReportRequest) String() string { return proto.CompactTextString(m) } func (*ListReportRequest) ProtoMessage() {} func (*ListReportRequest) Descriptor() ([]byte, []int) { return fileDescriptor_1e440702eea137dd, []int{2} } func (m *ListReportRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ListReportRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ListReportRequest.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 *ListReportRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_ListReportRequest.Merge(m, src) } func (m *ListReportRequest) XXX_Size() int { return m.Size() } func (m *ListReportRequest) XXX_DiscardUnknown() { xxx_messageInfo_ListReportRequest.DiscardUnknown(m) } var xxx_messageInfo_ListReportRequest proto.InternalMessageInfo func (m *ListReportRequest) GetPage() int64 { if m != nil { return m.Page } return 0 } func (m *ListReportRequest) GetSize_() int64 { if m != nil { return m.Size_ } return 0 } func (m *ListReportRequest) GetWd() string { if m != nil { return m.Wd } return "" } func (m *ListReportRequest) GetField() []string { if m != nil { return m.Field } return nil } func (m *ListReportRequest) GetOrder() string { if m != nil { return m.Order } return "" } func (m *ListReportRequest) GetStatus() []bool { if m != nil { return m.Status } return nil } // 举报列表响应 type ListReportReply struct { Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` Report []*Report `protobuf:"bytes,2,rep,name=report,proto3" json:"report,omitempty"` } func (m *ListReportReply) Reset() { *m = ListReportReply{} } func (m *ListReportReply) String() string { return proto.CompactTextString(m) } func (*ListReportReply) ProtoMessage() {} func (*ListReportReply) Descriptor() ([]byte, []int) { return fileDescriptor_1e440702eea137dd, []int{3} } func (m *ListReportReply) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ListReportReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ListReportReply.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 *ListReportReply) XXX_Merge(src proto.Message) { xxx_messageInfo_ListReportReply.Merge(m, src) } func (m *ListReportReply) XXX_Size() int { return m.Size() } func (m *ListReportReply) XXX_DiscardUnknown() { xxx_messageInfo_ListReportReply.DiscardUnknown(m) } var xxx_messageInfo_ListReportReply proto.InternalMessageInfo func (m *ListReportReply) GetTotal() int64 { if m != nil { return m.Total } return 0 } func (m *ListReportReply) GetReport() []*Report { if m != nil { return m.Report } return nil } func init() { proto.RegisterType((*Report)(nil), "api.v1.Report") proto.RegisterType((*DeleteReportRequest)(nil), "api.v1.DeleteReportRequest") proto.RegisterType((*ListReportRequest)(nil), "api.v1.ListReportRequest") proto.RegisterType((*ListReportReply)(nil), "api.v1.ListReportReply") } func init() { proto.RegisterFile("api/v1/report.proto", fileDescriptor_1e440702eea137dd) } var fileDescriptor_1e440702eea137dd = []byte{ // 606 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x4f, 0x4f, 0xd5, 0x4c, 0x14, 0xc6, 0x99, 0xf6, 0x52, 0xe8, 0xc0, 0x7b, 0x5f, 0x99, 0x8b, 0x50, 0x8a, 0x29, 0x4d, 0x13, 0x4c, 0xc3, 0xa2, 0x0d, 0x18, 0x37, 0xba, 0x30, 0xa0, 0x2e, 0x48, 0x4c, 0xc4, 0x06, 0x37, 0x1a, 0x43, 0x06, 0x66, 0xb8, 0x99, 0xd8, 0x76, 0x6a, 0x3b, 0x85, 0xe0, 0xd2, 0x2f, 0x20, 0x89, 0x5f, 0xca, 0x25, 0x89, 0x1b, 0x77, 0x18, 0x70, 0xeb, 0x77, 0x30, 0xf3, 0xa7, 0xc0, 0x05, 0x4c, 0x8c, 0xbb, 0x39, 0xcf, 0xd3, 0xf3, 0xcb, 0x99, 0xf3, 0xcc, 0xbd, 0x70, 0x80, 0x2b, 0x96, 0x1e, 0xac, 0xa6, 0x35, 0xad, 0x78, 0x2d, 0x92, 0xaa, 0xe6, 0x82, 0x23, 0x07, 0x57, 0x2c, 0x39, 0x58, 0xf5, 0x97, 0x86, 0x9c, 0x0f, 0x73, 0x9a, 0x2a, 0x75, 0xb7, 0xdd, 0x4f, 0x05, 0x2b, 0x68, 0x23, 0x70, 0x51, 0xe9, 0x0f, 0xfd, 0xd9, 0x21, 0x1f, 0x72, 0x75, 0x4c, 0xe5, 0xc9, 0xa8, 0xf7, 0x4c, 0x9b, 0x44, 0xe3, 0xb2, 0xe4, 0x02, 0x0b, 0xc6, 0xcb, 0xc6, 0xb8, 0x8b, 0xd7, 0xa1, 0xb4, 0xa8, 0xc4, 0x91, 0x36, 0xa3, 0x53, 0x0b, 0x3a, 0x99, 0x1a, 0x05, 0xf5, 0xa1, 0xc5, 0x88, 0x07, 0x42, 0x10, 0xdb, 0x99, 0xc5, 0x08, 0x5a, 0x82, 0x53, 0x84, 0xef, 0xb5, 0x05, 0x2d, 0xc5, 0x0e, 0x23, 0x9e, 0xa5, 0x0c, 0xd8, 0x49, 0x9b, 0x04, 0xcd, 0xc3, 0x89, 0xb6, 0xa1, 0xb5, 0x34, 0x6d, 0x65, 0x3a, 0xb2, 0xdc, 0x24, 0x68, 0x0e, 0x3a, 0x35, 0xc5, 0x0d, 0x2f, 0xbd, 0x5e, 0x08, 0xe2, 0xf1, 0xcc, 0x54, 0x52, 0x6f, 0x04, 0x16, 0x6d, 0xe3, 0x8d, 0x87, 0x20, 0x9e, 0xcc, 0x4c, 0x85, 0x9e, 0x40, 0xb8, 0x57, 0x53, 0x2c, 0x28, 0xd9, 0xc1, 0xc2, 0x73, 0x42, 0x10, 0x4f, 0xad, 0xf9, 0x89, 0x1e, 0x3b, 0xe9, 0xc6, 0x4e, 0xb6, 0xbb, 0x5d, 0x6c, 0xf4, 0x8e, 0x4f, 0x97, 0x40, 0xe6, 0x9a, 0x9e, 0x75, 0x21, 0x01, 0x6d, 0x45, 0x3a, 0xc0, 0xc4, 0xdf, 0x02, 0x4c, 0xcf, 0xba, 0x40, 0xcb, 0xb0, 0x7f, 0x71, 0x57, 0xc1, 0x44, 0x4e, 0xbd, 0xc9, 0x10, 0xc4, 0x6e, 0xf6, 0x5f, 0xa7, 0x6e, 0x4b, 0x51, 0x5f, 0xac, 0xc0, 0xf5, 0x7b, 0xcf, 0x55, 0xb6, 0xa9, 0x90, 0x0f, 0x27, 0xe5, 0xd5, 0x4b, 0x5c, 0x50, 0x0f, 0x2a, 0xe7, 0xa2, 0x8e, 0x96, 0xe1, 0xe0, 0x19, 0xcd, 0xa9, 0xa0, 0x7a, 0xcd, 0x19, 0xfd, 0xd0, 0xd2, 0xe6, 0x72, 0xdb, 0xb6, 0xde, 0x76, 0xf4, 0x19, 0xc0, 0x99, 0x17, 0xac, 0x11, 0xa3, 0x5f, 0x21, 0xd8, 0xab, 0xf0, 0x90, 0x9a, 0x54, 0xd4, 0x59, 0x6a, 0x0d, 0xfb, 0x48, 0x4d, 0x20, 0xea, 0x2c, 0x69, 0x87, 0x3a, 0x05, 0x37, 0xb3, 0x0e, 0x09, 0x9a, 0x85, 0xe3, 0xfb, 0x8c, 0xe6, 0xc4, 0xeb, 0x85, 0x76, 0xec, 0x66, 0xba, 0x90, 0x2a, 0xaf, 0x09, 0xad, 0xd5, 0xfa, 0xdd, 0x4c, 0x17, 0x57, 0x52, 0x71, 0x42, 0xfb, 0x32, 0x95, 0xe8, 0x25, 0xfc, 0xff, 0xea, 0x40, 0x55, 0x7e, 0x24, 0x01, 0x82, 0x0b, 0x9c, 0x9b, 0x79, 0x74, 0x81, 0xee, 0xcb, 0xad, 0xc8, 0x8f, 0x3c, 0x2b, 0xb4, 0xe3, 0xa9, 0xb5, 0x7e, 0xa2, 0x9f, 0x73, 0x62, 0x5a, 0x8d, 0xbb, 0xf6, 0xcb, 0x82, 0xae, 0x96, 0xd6, 0xb7, 0x36, 0xd1, 0x2b, 0x38, 0xfd, 0x54, 0x05, 0xd8, 0x3d, 0xbf, 0xd1, 0x2e, 0x7f, 0xee, 0x46, 0x7e, 0xcf, 0xe5, 0xbb, 0x8d, 0x16, 0x3e, 0x7d, 0xfb, 0xf9, 0xc5, 0x1a, 0x44, 0xfd, 0x74, 0xe4, 0x97, 0xf4, 0x08, 0xac, 0x48, 0xe4, 0x6b, 0x15, 0xe9, 0xbf, 0x21, 0xfd, 0x5b, 0x90, 0x6f, 0xe1, 0xf4, 0xd5, 0xf4, 0xd0, 0x62, 0x87, 0xbc, 0x25, 0xd3, 0x3f, 0xf2, 0xe7, 0x14, 0xff, 0xce, 0xca, 0x35, 0x3e, 0x7a, 0x07, 0xe1, 0xe5, 0x86, 0xd1, 0x42, 0x87, 0xbe, 0xf1, 0x0c, 0xfc, 0xf9, 0xdb, 0xac, 0x2a, 0x3f, 0x8a, 0x16, 0x15, 0xf9, 0x2e, 0x1a, 0x8c, 0x92, 0xd3, 0x9c, 0x35, 0x62, 0xe3, 0xe1, 0xd7, 0xb3, 0x00, 0x9c, 0x9c, 0x05, 0xe0, 0xc7, 0x59, 0x00, 0x8e, 0xcf, 0x83, 0xb1, 0x93, 0xf3, 0x60, 0xec, 0xfb, 0x79, 0x30, 0x06, 0xcd, 0xff, 0xcd, 0x16, 0x78, 0x33, 0x53, 0xf0, 0x9a, 0x12, 0xbe, 0x67, 0xfa, 0x1f, 0x1f, 0xac, 0xee, 0x3a, 0x6a, 0xfa, 0x07, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x19, 0xe4, 0x23, 0xcf, 0xaa, 0x04, 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 // ReportAPIClient is the client API for ReportAPI service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type ReportAPIClient interface { // 创建举报 CreateReport(ctx context.Context, in *Report, opts ...grpc.CallOption) (*emptypb.Empty, error) // 更新举报,审核举报内容 UpdateReport(ctx context.Context, in *Report, opts ...grpc.CallOption) (*emptypb.Empty, error) // 删除举报 DeleteReport(ctx context.Context, in *DeleteReportRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // 获取举报列表 ListReport(ctx context.Context, in *ListReportRequest, opts ...grpc.CallOption) (*ListReportReply, error) } type reportAPIClient struct { cc *grpc.ClientConn } func NewReportAPIClient(cc *grpc.ClientConn) ReportAPIClient { return &reportAPIClient{cc} } func (c *reportAPIClient) CreateReport(ctx context.Context, in *Report, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/api.v1.ReportAPI/CreateReport", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *reportAPIClient) UpdateReport(ctx context.Context, in *Report, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/api.v1.ReportAPI/UpdateReport", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *reportAPIClient) DeleteReport(ctx context.Context, in *DeleteReportRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/api.v1.ReportAPI/DeleteReport", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *reportAPIClient) ListReport(ctx context.Context, in *ListReportRequest, opts ...grpc.CallOption) (*ListReportReply, error) { out := new(ListReportReply) err := c.cc.Invoke(ctx, "/api.v1.ReportAPI/ListReport", in, out, opts...) if err != nil { return nil, err } return out, nil } // ReportAPIServer is the server API for ReportAPI service. type ReportAPIServer interface { // 创建举报 CreateReport(context.Context, *Report) (*emptypb.Empty, error) // 更新举报,审核举报内容 UpdateReport(context.Context, *Report) (*emptypb.Empty, error) // 删除举报 DeleteReport(context.Context, *DeleteReportRequest) (*emptypb.Empty, error) // 获取举报列表 ListReport(context.Context, *ListReportRequest) (*ListReportReply, error) } // UnimplementedReportAPIServer can be embedded to have forward compatible implementations. type UnimplementedReportAPIServer struct { } func (*UnimplementedReportAPIServer) CreateReport(ctx context.Context, req *Report) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateReport not implemented") } func (*UnimplementedReportAPIServer) UpdateReport(ctx context.Context, req *Report) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateReport not implemented") } func (*UnimplementedReportAPIServer) DeleteReport(ctx context.Context, req *DeleteReportRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteReport not implemented") } func (*UnimplementedReportAPIServer) ListReport(ctx context.Context, req *ListReportRequest) (*ListReportReply, error) { return nil, status.Errorf(codes.Unimplemented, "method ListReport not implemented") } func RegisterReportAPIServer(s *grpc.Server, srv ReportAPIServer) { s.RegisterService(&_ReportAPI_serviceDesc, srv) } func _ReportAPI_CreateReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Report) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ReportAPIServer).CreateReport(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.v1.ReportAPI/CreateReport", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ReportAPIServer).CreateReport(ctx, req.(*Report)) } return interceptor(ctx, in, info, handler) } func _ReportAPI_UpdateReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Report) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ReportAPIServer).UpdateReport(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.v1.ReportAPI/UpdateReport", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ReportAPIServer).UpdateReport(ctx, req.(*Report)) } return interceptor(ctx, in, info, handler) } func _ReportAPI_DeleteReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteReportRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ReportAPIServer).DeleteReport(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.v1.ReportAPI/DeleteReport", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ReportAPIServer).DeleteReport(ctx, req.(*DeleteReportRequest)) } return interceptor(ctx, in, info, handler) } func _ReportAPI_ListReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListReportRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ReportAPIServer).ListReport(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.v1.ReportAPI/ListReport", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ReportAPIServer).ListReport(ctx, req.(*ListReportRequest)) } return interceptor(ctx, in, info, handler) } var _ReportAPI_serviceDesc = grpc.ServiceDesc{ ServiceName: "api.v1.ReportAPI", HandlerType: (*ReportAPIServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateReport", Handler: _ReportAPI_CreateReport_Handler, }, { MethodName: "UpdateReport", Handler: _ReportAPI_UpdateReport_Handler, }, { MethodName: "DeleteReport", Handler: _ReportAPI_DeleteReport_Handler, }, { MethodName: "ListReport", Handler: _ReportAPI_ListReport_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/v1/report.proto", } func (m *Report) 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 *Report) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Report) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Username) > 0 { i -= len(m.Username) copy(dAtA[i:], m.Username) i = encodeVarintReport(dAtA, i, uint64(len(m.Username))) i-- dAtA[i] = 0x52 } if len(m.Remark) > 0 { i -= len(m.Remark) copy(dAtA[i:], m.Remark) i = encodeVarintReport(dAtA, i, uint64(len(m.Remark))) i-- dAtA[i] = 0x4a } if len(m.DocumentTitle) > 0 { i -= len(m.DocumentTitle) copy(dAtA[i:], m.DocumentTitle) i = encodeVarintReport(dAtA, i, uint64(len(m.DocumentTitle))) i-- dAtA[i] = 0x42 } if m.UpdatedAt != nil { n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.UpdatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.UpdatedAt):]) if err1 != nil { return 0, err1 } i -= n1 i = encodeVarintReport(dAtA, i, uint64(n1)) i-- dAtA[i] = 0x3a } if m.CreatedAt != nil { n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.CreatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.CreatedAt):]) if err2 != nil { return 0, err2 } i -= n2 i = encodeVarintReport(dAtA, i, uint64(n2)) i-- dAtA[i] = 0x32 } if m.Status { i-- if m.Status { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- dAtA[i] = 0x28 } if m.Reason != 0 { i = encodeVarintReport(dAtA, i, uint64(m.Reason)) i-- dAtA[i] = 0x20 } if m.UserId != 0 { i = encodeVarintReport(dAtA, i, uint64(m.UserId)) i-- dAtA[i] = 0x18 } if m.DocumentId != 0 { i = encodeVarintReport(dAtA, i, uint64(m.DocumentId)) i-- dAtA[i] = 0x10 } if m.Id != 0 { i = encodeVarintReport(dAtA, i, uint64(m.Id)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *DeleteReportRequest) 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 *DeleteReportRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *DeleteReportRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Id) > 0 { dAtA4 := make([]byte, len(m.Id)*10) var j3 int for _, num1 := range m.Id { num := uint64(num1) for num >= 1<<7 { dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 j3++ } dAtA4[j3] = uint8(num) j3++ } i -= j3 copy(dAtA[i:], dAtA4[:j3]) i = encodeVarintReport(dAtA, i, uint64(j3)) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *ListReportRequest) 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 *ListReportRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ListReportRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Status) > 0 { for iNdEx := len(m.Status) - 1; iNdEx >= 0; iNdEx-- { i-- if m.Status[iNdEx] { dAtA[i] = 1 } else { dAtA[i] = 0 } } i = encodeVarintReport(dAtA, i, uint64(len(m.Status))) i-- dAtA[i] = 0x32 } if len(m.Order) > 0 { i -= len(m.Order) copy(dAtA[i:], m.Order) i = encodeVarintReport(dAtA, i, uint64(len(m.Order))) i-- dAtA[i] = 0x2a } if len(m.Field) > 0 { for iNdEx := len(m.Field) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Field[iNdEx]) copy(dAtA[i:], m.Field[iNdEx]) i = encodeVarintReport(dAtA, i, uint64(len(m.Field[iNdEx]))) i-- dAtA[i] = 0x22 } } if len(m.Wd) > 0 { i -= len(m.Wd) copy(dAtA[i:], m.Wd) i = encodeVarintReport(dAtA, i, uint64(len(m.Wd))) i-- dAtA[i] = 0x1a } if m.Size_ != 0 { i = encodeVarintReport(dAtA, i, uint64(m.Size_)) i-- dAtA[i] = 0x10 } if m.Page != 0 { i = encodeVarintReport(dAtA, i, uint64(m.Page)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *ListReportReply) 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 *ListReportReply) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ListReportReply) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Report) > 0 { for iNdEx := len(m.Report) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Report[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintReport(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } } if m.Total != 0 { i = encodeVarintReport(dAtA, i, uint64(m.Total)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func encodeVarintReport(dAtA []byte, offset int, v uint64) int { offset -= sovReport(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *Report) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Id != 0 { n += 1 + sovReport(uint64(m.Id)) } if m.DocumentId != 0 { n += 1 + sovReport(uint64(m.DocumentId)) } if m.UserId != 0 { n += 1 + sovReport(uint64(m.UserId)) } if m.Reason != 0 { n += 1 + sovReport(uint64(m.Reason)) } if m.Status { n += 2 } if m.CreatedAt != nil { l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.CreatedAt) n += 1 + l + sovReport(uint64(l)) } if m.UpdatedAt != nil { l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.UpdatedAt) n += 1 + l + sovReport(uint64(l)) } l = len(m.DocumentTitle) if l > 0 { n += 1 + l + sovReport(uint64(l)) } l = len(m.Remark) if l > 0 { n += 1 + l + sovReport(uint64(l)) } l = len(m.Username) if l > 0 { n += 1 + l + sovReport(uint64(l)) } return n } func (m *DeleteReportRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Id) > 0 { l = 0 for _, e := range m.Id { l += sovReport(uint64(e)) } n += 1 + sovReport(uint64(l)) + l } return n } func (m *ListReportRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Page != 0 { n += 1 + sovReport(uint64(m.Page)) } if m.Size_ != 0 { n += 1 + sovReport(uint64(m.Size_)) } l = len(m.Wd) if l > 0 { n += 1 + l + sovReport(uint64(l)) } if len(m.Field) > 0 { for _, s := range m.Field { l = len(s) n += 1 + l + sovReport(uint64(l)) } } l = len(m.Order) if l > 0 { n += 1 + l + sovReport(uint64(l)) } if len(m.Status) > 0 { n += 1 + sovReport(uint64(len(m.Status))) + len(m.Status)*1 } return n } func (m *ListReportReply) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Total != 0 { n += 1 + sovReport(uint64(m.Total)) } if len(m.Report) > 0 { for _, e := range m.Report { l = e.Size() n += 1 + l + sovReport(uint64(l)) } } return n } func sovReport(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozReport(x uint64) (n int) { return sovReport(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *Report) 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 ErrIntOverflowReport } 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: Report: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Report: 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 ErrIntOverflowReport } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Id |= int64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field DocumentId", wireType) } m.DocumentId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowReport } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.DocumentId |= int64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field UserId", wireType) } m.UserId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowReport } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.UserId |= int64(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) } m.Reason = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowReport } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Reason |= int32(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowReport } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.Status = bool(v != 0) case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowReport } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthReport } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthReport } if postIndex > l { return io.ErrUnexpectedEOF } if m.CreatedAt == nil { m.CreatedAt = new(time.Time) } if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowReport } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthReport } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthReport } if postIndex > l { return io.ErrUnexpectedEOF } if m.UpdatedAt == nil { m.UpdatedAt = new(time.Time) } if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.UpdatedAt, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DocumentTitle", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowReport } 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 ErrInvalidLengthReport } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthReport } if postIndex > l { return io.ErrUnexpectedEOF } m.DocumentTitle = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Remark", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowReport } 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 ErrInvalidLengthReport } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthReport } if postIndex > l { return io.ErrUnexpectedEOF } m.Remark = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 10: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowReport } 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 ErrInvalidLengthReport } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthReport } if postIndex > l { return io.ErrUnexpectedEOF } m.Username = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipReport(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthReport } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *DeleteReportRequest) 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 ErrIntOverflowReport } 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: DeleteReportRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: DeleteReportRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType == 0 { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowReport } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.Id = append(m.Id, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowReport } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return ErrInvalidLengthReport } postIndex := iNdEx + packedLen if postIndex < 0 { return ErrInvalidLengthReport } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int var count int for _, integer := range dAtA[iNdEx:postIndex] { if integer < 128 { count++ } } elementCount = count if elementCount != 0 && len(m.Id) == 0 { m.Id = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowReport } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int64(b&0x7F) << shift if b < 0x80 { break } } m.Id = append(m.Id, v) } } else { return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } default: iNdEx = preIndex skippy, err := skipReport(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthReport } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ListReportRequest) 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 ErrIntOverflowReport } 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: ListReportRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ListReportRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Page", wireType) } m.Page = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowReport } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Page |= int64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType) } m.Size_ = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowReport } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Size_ |= int64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Wd", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowReport } 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 ErrInvalidLengthReport } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthReport } if postIndex > l { return io.ErrUnexpectedEOF } m.Wd = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowReport } 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 ErrInvalidLengthReport } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthReport } if postIndex > l { return io.ErrUnexpectedEOF } m.Field = append(m.Field, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowReport } 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 ErrInvalidLengthReport } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthReport } if postIndex > l { return io.ErrUnexpectedEOF } m.Order = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: if wireType == 0 { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowReport } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.Status = append(m.Status, bool(v != 0)) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowReport } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ packedLen |= int(b&0x7F) << shift if b < 0x80 { break } } if packedLen < 0 { return ErrInvalidLengthReport } postIndex := iNdEx + packedLen if postIndex < 0 { return ErrInvalidLengthReport } if postIndex > l { return io.ErrUnexpectedEOF } var elementCount int elementCount = packedLen if elementCount != 0 && len(m.Status) == 0 { m.Status = make([]bool, 0, elementCount) } for iNdEx < postIndex { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowReport } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int(b&0x7F) << shift if b < 0x80 { break } } m.Status = append(m.Status, bool(v != 0)) } } else { return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } default: iNdEx = preIndex skippy, err := skipReport(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthReport } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ListReportReply) 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 ErrIntOverflowReport } 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: ListReportReply: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ListReportReply: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) } m.Total = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowReport } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Total |= int64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Report", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowReport } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthReport } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthReport } if postIndex > l { return io.ErrUnexpectedEOF } m.Report = append(m.Report, &Report{}) if err := m.Report[len(m.Report)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipReport(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthReport } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipReport(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, ErrIntOverflowReport } 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, ErrIntOverflowReport } 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, ErrIntOverflowReport } 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, ErrInvalidLengthReport } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupReport } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthReport } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthReport = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowReport = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupReport = fmt.Errorf("proto: unexpected end of group") )