// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 // protoc v3.17.3 // source: db.proto package pb import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // //客服聊天msg type DbMsgReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Cmd *DbCommandMsg `protobuf:"bytes,1,opt,name=cmd,proto3" json:"cmd,omitempty"` } func (x *DbMsgReq) Reset() { *x = DbMsgReq{} if protoimpl.UnsafeEnabled { mi := &file_db_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DbMsgReq) String() string { return protoimpl.X.MessageStringOf(x) } func (*DbMsgReq) ProtoMessage() {} func (x *DbMsgReq) ProtoReflect() protoreflect.Message { mi := &file_db_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use DbMsgReq.ProtoReflect.Descriptor instead. func (*DbMsgReq) Descriptor() ([]byte, []int) { return file_db_proto_rawDescGZIP(), []int{0} } func (x *DbMsgReq) GetCmd() *DbCommandMsg { if x != nil { return x.Cmd } return nil } type DbMsgRes struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Cmd *DbCommandMsg `protobuf:"bytes,1,opt,name=cmd,proto3" json:"cmd,omitempty"` } func (x *DbMsgRes) Reset() { *x = DbMsgRes{} if protoimpl.UnsafeEnabled { mi := &file_db_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *DbMsgRes) String() string { return protoimpl.X.MessageStringOf(x) } func (*DbMsgRes) ProtoMessage() {} func (x *DbMsgRes) ProtoReflect() protoreflect.Message { mi := &file_db_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use DbMsgRes.ProtoReflect.Descriptor instead. func (*DbMsgRes) Descriptor() ([]byte, []int) { return file_db_proto_rawDescGZIP(), []int{1} } func (x *DbMsgRes) GetCmd() *DbCommandMsg { if x != nil { return x.Cmd } return nil } // //敏感词信息msg type SensReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } func (x *SensReq) Reset() { *x = SensReq{} if protoimpl.UnsafeEnabled { mi := &file_db_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *SensReq) String() string { return protoimpl.X.MessageStringOf(x) } func (*SensReq) ProtoMessage() {} func (x *SensReq) ProtoReflect() protoreflect.Message { mi := &file_db_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use SensReq.ProtoReflect.Descriptor instead. func (*SensReq) Descriptor() ([]byte, []int) { return file_db_proto_rawDescGZIP(), []int{2} } type SensRes struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields SensWords []string `protobuf:"bytes,1,rep,name=sens_words,json=sensWords,proto3" json:"sens_words,omitempty"` FilterWord []string `protobuf:"bytes,2,rep,name=filter_word,json=filterWord,proto3" json:"filter_word,omitempty"` } func (x *SensRes) Reset() { *x = SensRes{} if protoimpl.UnsafeEnabled { mi := &file_db_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *SensRes) String() string { return protoimpl.X.MessageStringOf(x) } func (*SensRes) ProtoMessage() {} func (x *SensRes) ProtoReflect() protoreflect.Message { mi := &file_db_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use SensRes.ProtoReflect.Descriptor instead. func (*SensRes) Descriptor() ([]byte, []int) { return file_db_proto_rawDescGZIP(), []int{3} } func (x *SensRes) GetSensWords() []string { if x != nil { return x.SensWords } return nil } func (x *SensRes) GetFilterWord() []string { if x != nil { return x.FilterWord } return nil } var File_db_proto protoreflect.FileDescriptor var file_db_proto_rawDesc = []byte{ 0x0a, 0x08, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x0c, 0x64, 0x62, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2e, 0x0a, 0x08, 0x44, 0x62, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x62, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x52, 0x03, 0x63, 0x6d, 0x64, 0x22, 0x2e, 0x0a, 0x08, 0x44, 0x62, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x62, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x52, 0x03, 0x63, 0x6d, 0x64, 0x22, 0x09, 0x0a, 0x07, 0x53, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x22, 0x49, 0x0a, 0x07, 0x53, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x6e, 0x73, 0x5f, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x73, 0x57, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x57, 0x6f, 0x72, 0x64, 0x32, 0x8a, 0x01, 0x0a, 0x02, 0x44, 0x62, 0x12, 0x2b, 0x0a, 0x07, 0x44, 0x62, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x62, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x62, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x26, 0x0a, 0x06, 0x44, 0x62, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x62, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x62, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x57, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x22, 0x00, 0x42, 0x05, 0x5a, 0x03, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_db_proto_rawDescOnce sync.Once file_db_proto_rawDescData = file_db_proto_rawDesc ) func file_db_proto_rawDescGZIP() []byte { file_db_proto_rawDescOnce.Do(func() { file_db_proto_rawDescData = protoimpl.X.CompressGZIP(file_db_proto_rawDescData) }) return file_db_proto_rawDescData } var file_db_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_db_proto_goTypes = []interface{}{ (*DbMsgReq)(nil), // 0: pb.DbMsgReq (*DbMsgRes)(nil), // 1: pb.DbMsgRes (*SensReq)(nil), // 2: pb.SensReq (*SensRes)(nil), // 3: pb.SensRes (*DbCommandMsg)(nil), // 4: pb.DbCommandMsg } var file_db_proto_depIdxs = []int32{ 4, // 0: pb.DbMsgReq.cmd:type_name -> pb.DbCommandMsg 4, // 1: pb.DbMsgRes.cmd:type_name -> pb.DbCommandMsg 0, // 2: pb.Db.DbLogin:input_type -> pb.DbMsgReq 0, // 3: pb.Db.DbCall:input_type -> pb.DbMsgReq 2, // 4: pb.Db.GetSensitiveWords:input_type -> pb.SensReq 1, // 5: pb.Db.DbLogin:output_type -> pb.DbMsgRes 1, // 6: pb.Db.DbCall:output_type -> pb.DbMsgRes 3, // 7: pb.Db.GetSensitiveWords:output_type -> pb.SensRes 5, // [5:8] is the sub-list for method output_type 2, // [2:5] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name } func init() { file_db_proto_init() } func file_db_proto_init() { if File_db_proto != nil { return } file_db_msg_proto_init() if !protoimpl.UnsafeEnabled { file_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DbMsgReq); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DbMsgRes); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SensReq); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_db_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SensRes); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_db_proto_rawDesc, NumEnums: 0, NumMessages: 4, NumExtensions: 0, NumServices: 1, }, GoTypes: file_db_proto_goTypes, DependencyIndexes: file_db_proto_depIdxs, MessageInfos: file_db_proto_msgTypes, }.Build() File_db_proto = out.File file_db_proto_rawDesc = nil file_db_proto_goTypes = nil file_db_proto_depIdxs = nil } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConnInterface // 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.SupportPackageIsVersion6 // DbClient is the client API for Db service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type DbClient interface { // 客服聊天 DbLogin(ctx context.Context, opts ...grpc.CallOption) (Db_DbLoginClient, error) DbCall(ctx context.Context, in *DbMsgReq, opts ...grpc.CallOption) (*DbMsgRes, error) // 游戏聊天 // 敏感词库信息获取 GetSensitiveWords(ctx context.Context, in *SensReq, opts ...grpc.CallOption) (*SensRes, error) } type dbClient struct { cc grpc.ClientConnInterface } func NewDbClient(cc grpc.ClientConnInterface) DbClient { return &dbClient{cc} } func (c *dbClient) DbLogin(ctx context.Context, opts ...grpc.CallOption) (Db_DbLoginClient, error) { stream, err := c.cc.NewStream(ctx, &_Db_serviceDesc.Streams[0], "/pb.Db/DbLogin", opts...) if err != nil { return nil, err } x := &dbDbLoginClient{stream} return x, nil } type Db_DbLoginClient interface { Send(*DbMsgReq) error Recv() (*DbMsgRes, error) grpc.ClientStream } type dbDbLoginClient struct { grpc.ClientStream } func (x *dbDbLoginClient) Send(m *DbMsgReq) error { return x.ClientStream.SendMsg(m) } func (x *dbDbLoginClient) Recv() (*DbMsgRes, error) { m := new(DbMsgRes) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *dbClient) DbCall(ctx context.Context, in *DbMsgReq, opts ...grpc.CallOption) (*DbMsgRes, error) { out := new(DbMsgRes) err := c.cc.Invoke(ctx, "/pb.Db/DbCall", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *dbClient) GetSensitiveWords(ctx context.Context, in *SensReq, opts ...grpc.CallOption) (*SensRes, error) { out := new(SensRes) err := c.cc.Invoke(ctx, "/pb.Db/GetSensitiveWords", in, out, opts...) if err != nil { return nil, err } return out, nil } // DbServer is the server API for Db service. type DbServer interface { // 客服聊天 DbLogin(Db_DbLoginServer) error DbCall(context.Context, *DbMsgReq) (*DbMsgRes, error) // 游戏聊天 // 敏感词库信息获取 GetSensitiveWords(context.Context, *SensReq) (*SensRes, error) } // UnimplementedDbServer can be embedded to have forward compatible implementations. type UnimplementedDbServer struct { } func (*UnimplementedDbServer) DbLogin(Db_DbLoginServer) error { return status.Errorf(codes.Unimplemented, "method DbLogin not implemented") } func (*UnimplementedDbServer) DbCall(context.Context, *DbMsgReq) (*DbMsgRes, error) { return nil, status.Errorf(codes.Unimplemented, "method DbCall not implemented") } func (*UnimplementedDbServer) GetSensitiveWords(context.Context, *SensReq) (*SensRes, error) { return nil, status.Errorf(codes.Unimplemented, "method GetSensitiveWords not implemented") } func RegisterDbServer(s *grpc.Server, srv DbServer) { s.RegisterService(&_Db_serviceDesc, srv) } func _Db_DbLogin_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(DbServer).DbLogin(&dbDbLoginServer{stream}) } type Db_DbLoginServer interface { Send(*DbMsgRes) error Recv() (*DbMsgReq, error) grpc.ServerStream } type dbDbLoginServer struct { grpc.ServerStream } func (x *dbDbLoginServer) Send(m *DbMsgRes) error { return x.ServerStream.SendMsg(m) } func (x *dbDbLoginServer) Recv() (*DbMsgReq, error) { m := new(DbMsgReq) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func _Db_DbCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DbMsgReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(DbServer).DbCall(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/pb.Db/DbCall", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DbServer).DbCall(ctx, req.(*DbMsgReq)) } return interceptor(ctx, in, info, handler) } func _Db_GetSensitiveWords_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SensReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(DbServer).GetSensitiveWords(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/pb.Db/GetSensitiveWords", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DbServer).GetSensitiveWords(ctx, req.(*SensReq)) } return interceptor(ctx, in, info, handler) } var _Db_serviceDesc = grpc.ServiceDesc{ ServiceName: "pb.Db", HandlerType: (*DbServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "DbCall", Handler: _Db_DbCall_Handler, }, { MethodName: "GetSensitiveWords", Handler: _Db_GetSensitiveWords_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "DbLogin", Handler: _Db_DbLogin_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "db.proto", }