github.com/annwntech/go-micro/v2@v2.9.5/agent/proto/bot.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // versions: 3 // protoc-gen-go v1.25.0 4 // protoc v3.13.0 5 // source: agent/proto/bot.proto 6 7 package go_micro_bot 8 9 import ( 10 context "context" 11 proto "github.com/golang/protobuf/proto" 12 grpc "google.golang.org/grpc" 13 codes "google.golang.org/grpc/codes" 14 status "google.golang.org/grpc/status" 15 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 16 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 17 reflect "reflect" 18 sync "sync" 19 ) 20 21 const ( 22 // Verify that this generated code is sufficiently up-to-date. 23 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 24 // Verify that runtime/protoimpl is sufficiently up-to-date. 25 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 26 ) 27 28 // This is a compile-time assertion that a sufficiently up-to-date version 29 // of the legacy proto package is being used. 30 const _ = proto.ProtoPackageIsVersion4 31 32 type HelpRequest struct { 33 state protoimpl.MessageState 34 sizeCache protoimpl.SizeCache 35 unknownFields protoimpl.UnknownFields 36 } 37 38 func (x *HelpRequest) Reset() { 39 *x = HelpRequest{} 40 if protoimpl.UnsafeEnabled { 41 mi := &file_agent_proto_bot_proto_msgTypes[0] 42 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 43 ms.StoreMessageInfo(mi) 44 } 45 } 46 47 func (x *HelpRequest) String() string { 48 return protoimpl.X.MessageStringOf(x) 49 } 50 51 func (*HelpRequest) ProtoMessage() {} 52 53 func (x *HelpRequest) ProtoReflect() protoreflect.Message { 54 mi := &file_agent_proto_bot_proto_msgTypes[0] 55 if protoimpl.UnsafeEnabled && x != nil { 56 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 57 if ms.LoadMessageInfo() == nil { 58 ms.StoreMessageInfo(mi) 59 } 60 return ms 61 } 62 return mi.MessageOf(x) 63 } 64 65 // Deprecated: Use HelpRequest.ProtoReflect.Descriptor instead. 66 func (*HelpRequest) Descriptor() ([]byte, []int) { 67 return file_agent_proto_bot_proto_rawDescGZIP(), []int{0} 68 } 69 70 type HelpResponse struct { 71 state protoimpl.MessageState 72 sizeCache protoimpl.SizeCache 73 unknownFields protoimpl.UnknownFields 74 75 Usage string `protobuf:"bytes,1,opt,name=usage,proto3" json:"usage,omitempty"` 76 Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` 77 } 78 79 func (x *HelpResponse) Reset() { 80 *x = HelpResponse{} 81 if protoimpl.UnsafeEnabled { 82 mi := &file_agent_proto_bot_proto_msgTypes[1] 83 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 84 ms.StoreMessageInfo(mi) 85 } 86 } 87 88 func (x *HelpResponse) String() string { 89 return protoimpl.X.MessageStringOf(x) 90 } 91 92 func (*HelpResponse) ProtoMessage() {} 93 94 func (x *HelpResponse) ProtoReflect() protoreflect.Message { 95 mi := &file_agent_proto_bot_proto_msgTypes[1] 96 if protoimpl.UnsafeEnabled && x != nil { 97 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 98 if ms.LoadMessageInfo() == nil { 99 ms.StoreMessageInfo(mi) 100 } 101 return ms 102 } 103 return mi.MessageOf(x) 104 } 105 106 // Deprecated: Use HelpResponse.ProtoReflect.Descriptor instead. 107 func (*HelpResponse) Descriptor() ([]byte, []int) { 108 return file_agent_proto_bot_proto_rawDescGZIP(), []int{1} 109 } 110 111 func (x *HelpResponse) GetUsage() string { 112 if x != nil { 113 return x.Usage 114 } 115 return "" 116 } 117 118 func (x *HelpResponse) GetDescription() string { 119 if x != nil { 120 return x.Description 121 } 122 return "" 123 } 124 125 type ExecRequest struct { 126 state protoimpl.MessageState 127 sizeCache protoimpl.SizeCache 128 unknownFields protoimpl.UnknownFields 129 130 Args []string `protobuf:"bytes,1,rep,name=args,proto3" json:"args,omitempty"` 131 } 132 133 func (x *ExecRequest) Reset() { 134 *x = ExecRequest{} 135 if protoimpl.UnsafeEnabled { 136 mi := &file_agent_proto_bot_proto_msgTypes[2] 137 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 138 ms.StoreMessageInfo(mi) 139 } 140 } 141 142 func (x *ExecRequest) String() string { 143 return protoimpl.X.MessageStringOf(x) 144 } 145 146 func (*ExecRequest) ProtoMessage() {} 147 148 func (x *ExecRequest) ProtoReflect() protoreflect.Message { 149 mi := &file_agent_proto_bot_proto_msgTypes[2] 150 if protoimpl.UnsafeEnabled && x != nil { 151 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 152 if ms.LoadMessageInfo() == nil { 153 ms.StoreMessageInfo(mi) 154 } 155 return ms 156 } 157 return mi.MessageOf(x) 158 } 159 160 // Deprecated: Use ExecRequest.ProtoReflect.Descriptor instead. 161 func (*ExecRequest) Descriptor() ([]byte, []int) { 162 return file_agent_proto_bot_proto_rawDescGZIP(), []int{2} 163 } 164 165 func (x *ExecRequest) GetArgs() []string { 166 if x != nil { 167 return x.Args 168 } 169 return nil 170 } 171 172 type ExecResponse struct { 173 state protoimpl.MessageState 174 sizeCache protoimpl.SizeCache 175 unknownFields protoimpl.UnknownFields 176 177 Result []byte `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` 178 Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` 179 } 180 181 func (x *ExecResponse) Reset() { 182 *x = ExecResponse{} 183 if protoimpl.UnsafeEnabled { 184 mi := &file_agent_proto_bot_proto_msgTypes[3] 185 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 186 ms.StoreMessageInfo(mi) 187 } 188 } 189 190 func (x *ExecResponse) String() string { 191 return protoimpl.X.MessageStringOf(x) 192 } 193 194 func (*ExecResponse) ProtoMessage() {} 195 196 func (x *ExecResponse) ProtoReflect() protoreflect.Message { 197 mi := &file_agent_proto_bot_proto_msgTypes[3] 198 if protoimpl.UnsafeEnabled && x != nil { 199 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 200 if ms.LoadMessageInfo() == nil { 201 ms.StoreMessageInfo(mi) 202 } 203 return ms 204 } 205 return mi.MessageOf(x) 206 } 207 208 // Deprecated: Use ExecResponse.ProtoReflect.Descriptor instead. 209 func (*ExecResponse) Descriptor() ([]byte, []int) { 210 return file_agent_proto_bot_proto_rawDescGZIP(), []int{3} 211 } 212 213 func (x *ExecResponse) GetResult() []byte { 214 if x != nil { 215 return x.Result 216 } 217 return nil 218 } 219 220 func (x *ExecResponse) GetError() string { 221 if x != nil { 222 return x.Error 223 } 224 return "" 225 } 226 227 var File_agent_proto_bot_proto protoreflect.FileDescriptor 228 229 var file_agent_proto_bot_proto_rawDesc = []byte{ 230 0x0a, 0x15, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x62, 0x6f, 231 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 232 0x6f, 0x2e, 0x62, 0x6f, 0x74, 0x22, 0x0d, 0x0a, 0x0b, 0x48, 0x65, 0x6c, 0x70, 0x52, 0x65, 0x71, 233 0x75, 0x65, 0x73, 0x74, 0x22, 0x46, 0x0a, 0x0c, 0x48, 0x65, 0x6c, 0x70, 0x52, 0x65, 0x73, 0x70, 234 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 235 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 236 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 237 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x21, 0x0a, 0x0b, 238 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x61, 239 0x72, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x22, 240 0x3c, 0x0a, 0x0c, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 241 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 242 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 243 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x32, 0x8b, 0x01, 244 0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x3f, 0x0a, 0x04, 0x48, 0x65, 0x6c, 245 0x70, 0x12, 0x19, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x62, 0x6f, 0x74, 246 0x2e, 0x48, 0x65, 0x6c, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 247 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x62, 0x6f, 0x74, 0x2e, 0x48, 0x65, 0x6c, 0x70, 248 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x04, 0x45, 0x78, 249 0x65, 0x63, 0x12, 0x19, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x62, 0x6f, 250 0x74, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 251 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x62, 0x6f, 0x74, 0x2e, 0x45, 0x78, 0x65, 252 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x3b, 0x5a, 0x39, 0x67, 253 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x6e, 0x6e, 0x77, 0x6e, 0x74, 254 0x65, 0x63, 0x68, 0x2f, 0x67, 0x6f, 0x2d, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 255 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x67, 0x6f, 0x5f, 0x6d, 256 0x69, 0x63, 0x72, 0x6f, 0x5f, 0x62, 0x6f, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 257 } 258 259 var ( 260 file_agent_proto_bot_proto_rawDescOnce sync.Once 261 file_agent_proto_bot_proto_rawDescData = file_agent_proto_bot_proto_rawDesc 262 ) 263 264 func file_agent_proto_bot_proto_rawDescGZIP() []byte { 265 file_agent_proto_bot_proto_rawDescOnce.Do(func() { 266 file_agent_proto_bot_proto_rawDescData = protoimpl.X.CompressGZIP(file_agent_proto_bot_proto_rawDescData) 267 }) 268 return file_agent_proto_bot_proto_rawDescData 269 } 270 271 var file_agent_proto_bot_proto_msgTypes = make([]protoimpl.MessageInfo, 4) 272 var file_agent_proto_bot_proto_goTypes = []interface{}{ 273 (*HelpRequest)(nil), // 0: go.micro.bot.HelpRequest 274 (*HelpResponse)(nil), // 1: go.micro.bot.HelpResponse 275 (*ExecRequest)(nil), // 2: go.micro.bot.ExecRequest 276 (*ExecResponse)(nil), // 3: go.micro.bot.ExecResponse 277 } 278 var file_agent_proto_bot_proto_depIdxs = []int32{ 279 0, // 0: go.micro.bot.Command.Help:input_type -> go.micro.bot.HelpRequest 280 2, // 1: go.micro.bot.Command.Exec:input_type -> go.micro.bot.ExecRequest 281 1, // 2: go.micro.bot.Command.Help:output_type -> go.micro.bot.HelpResponse 282 3, // 3: go.micro.bot.Command.Exec:output_type -> go.micro.bot.ExecResponse 283 2, // [2:4] is the sub-list for method output_type 284 0, // [0:2] is the sub-list for method input_type 285 0, // [0:0] is the sub-list for extension type_name 286 0, // [0:0] is the sub-list for extension extendee 287 0, // [0:0] is the sub-list for field type_name 288 } 289 290 func init() { file_agent_proto_bot_proto_init() } 291 func file_agent_proto_bot_proto_init() { 292 if File_agent_proto_bot_proto != nil { 293 return 294 } 295 if !protoimpl.UnsafeEnabled { 296 file_agent_proto_bot_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 297 switch v := v.(*HelpRequest); i { 298 case 0: 299 return &v.state 300 case 1: 301 return &v.sizeCache 302 case 2: 303 return &v.unknownFields 304 default: 305 return nil 306 } 307 } 308 file_agent_proto_bot_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 309 switch v := v.(*HelpResponse); i { 310 case 0: 311 return &v.state 312 case 1: 313 return &v.sizeCache 314 case 2: 315 return &v.unknownFields 316 default: 317 return nil 318 } 319 } 320 file_agent_proto_bot_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 321 switch v := v.(*ExecRequest); i { 322 case 0: 323 return &v.state 324 case 1: 325 return &v.sizeCache 326 case 2: 327 return &v.unknownFields 328 default: 329 return nil 330 } 331 } 332 file_agent_proto_bot_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { 333 switch v := v.(*ExecResponse); i { 334 case 0: 335 return &v.state 336 case 1: 337 return &v.sizeCache 338 case 2: 339 return &v.unknownFields 340 default: 341 return nil 342 } 343 } 344 } 345 type x struct{} 346 out := protoimpl.TypeBuilder{ 347 File: protoimpl.DescBuilder{ 348 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 349 RawDescriptor: file_agent_proto_bot_proto_rawDesc, 350 NumEnums: 0, 351 NumMessages: 4, 352 NumExtensions: 0, 353 NumServices: 1, 354 }, 355 GoTypes: file_agent_proto_bot_proto_goTypes, 356 DependencyIndexes: file_agent_proto_bot_proto_depIdxs, 357 MessageInfos: file_agent_proto_bot_proto_msgTypes, 358 }.Build() 359 File_agent_proto_bot_proto = out.File 360 file_agent_proto_bot_proto_rawDesc = nil 361 file_agent_proto_bot_proto_goTypes = nil 362 file_agent_proto_bot_proto_depIdxs = nil 363 } 364 365 // Reference imports to suppress errors if they are not otherwise used. 366 var _ context.Context 367 var _ grpc.ClientConnInterface 368 369 // This is a compile-time assertion to ensure that this generated file 370 // is compatible with the grpc package it is being compiled against. 371 const _ = grpc.SupportPackageIsVersion6 372 373 // CommandClient is the client API for Command service. 374 // 375 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 376 type CommandClient interface { 377 Help(ctx context.Context, in *HelpRequest, opts ...grpc.CallOption) (*HelpResponse, error) 378 Exec(ctx context.Context, in *ExecRequest, opts ...grpc.CallOption) (*ExecResponse, error) 379 } 380 381 type commandClient struct { 382 cc grpc.ClientConnInterface 383 } 384 385 func NewCommandClient(cc grpc.ClientConnInterface) CommandClient { 386 return &commandClient{cc} 387 } 388 389 func (c *commandClient) Help(ctx context.Context, in *HelpRequest, opts ...grpc.CallOption) (*HelpResponse, error) { 390 out := new(HelpResponse) 391 err := c.cc.Invoke(ctx, "/go.micro.bot.Command/Help", in, out, opts...) 392 if err != nil { 393 return nil, err 394 } 395 return out, nil 396 } 397 398 func (c *commandClient) Exec(ctx context.Context, in *ExecRequest, opts ...grpc.CallOption) (*ExecResponse, error) { 399 out := new(ExecResponse) 400 err := c.cc.Invoke(ctx, "/go.micro.bot.Command/Exec", in, out, opts...) 401 if err != nil { 402 return nil, err 403 } 404 return out, nil 405 } 406 407 // CommandServer is the server API for Command service. 408 type CommandServer interface { 409 Help(context.Context, *HelpRequest) (*HelpResponse, error) 410 Exec(context.Context, *ExecRequest) (*ExecResponse, error) 411 } 412 413 // UnimplementedCommandServer can be embedded to have forward compatible implementations. 414 type UnimplementedCommandServer struct { 415 } 416 417 func (*UnimplementedCommandServer) Help(context.Context, *HelpRequest) (*HelpResponse, error) { 418 return nil, status.Errorf(codes.Unimplemented, "method Help not implemented") 419 } 420 func (*UnimplementedCommandServer) Exec(context.Context, *ExecRequest) (*ExecResponse, error) { 421 return nil, status.Errorf(codes.Unimplemented, "method Exec not implemented") 422 } 423 424 func RegisterCommandServer(s *grpc.Server, srv CommandServer) { 425 s.RegisterService(&_Command_serviceDesc, srv) 426 } 427 428 func _Command_Help_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 429 in := new(HelpRequest) 430 if err := dec(in); err != nil { 431 return nil, err 432 } 433 if interceptor == nil { 434 return srv.(CommandServer).Help(ctx, in) 435 } 436 info := &grpc.UnaryServerInfo{ 437 Server: srv, 438 FullMethod: "/go.micro.bot.Command/Help", 439 } 440 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 441 return srv.(CommandServer).Help(ctx, req.(*HelpRequest)) 442 } 443 return interceptor(ctx, in, info, handler) 444 } 445 446 func _Command_Exec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 447 in := new(ExecRequest) 448 if err := dec(in); err != nil { 449 return nil, err 450 } 451 if interceptor == nil { 452 return srv.(CommandServer).Exec(ctx, in) 453 } 454 info := &grpc.UnaryServerInfo{ 455 Server: srv, 456 FullMethod: "/go.micro.bot.Command/Exec", 457 } 458 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 459 return srv.(CommandServer).Exec(ctx, req.(*ExecRequest)) 460 } 461 return interceptor(ctx, in, info, handler) 462 } 463 464 var _Command_serviceDesc = grpc.ServiceDesc{ 465 ServiceName: "go.micro.bot.Command", 466 HandlerType: (*CommandServer)(nil), 467 Methods: []grpc.MethodDesc{ 468 { 469 MethodName: "Help", 470 Handler: _Command_Help_Handler, 471 }, 472 { 473 MethodName: "Exec", 474 Handler: _Command_Exec_Handler, 475 }, 476 }, 477 Streams: []grpc.StreamDesc{}, 478 Metadata: "agent/proto/bot.proto", 479 }