github.com/micro/go-micro/v2@v2.9.1/agent/proto/bot.pb.go (about)

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // source: agent/proto/bot.proto
     3  
     4  package go_micro_bot
     5  
     6  import (
     7  	context "context"
     8  	fmt "fmt"
     9  	proto "github.com/golang/protobuf/proto"
    10  	grpc "google.golang.org/grpc"
    11  	codes "google.golang.org/grpc/codes"
    12  	status "google.golang.org/grpc/status"
    13  	math "math"
    14  )
    15  
    16  // Reference imports to suppress errors if they are not otherwise used.
    17  var _ = proto.Marshal
    18  var _ = fmt.Errorf
    19  var _ = math.Inf
    20  
    21  // This is a compile-time assertion to ensure that this generated file
    22  // is compatible with the proto package it is being compiled against.
    23  // A compilation error at this line likely means your copy of the
    24  // proto package needs to be updated.
    25  const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
    26  
    27  type HelpRequest struct {
    28  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
    29  	XXX_unrecognized     []byte   `json:"-"`
    30  	XXX_sizecache        int32    `json:"-"`
    31  }
    32  
    33  func (m *HelpRequest) Reset()         { *m = HelpRequest{} }
    34  func (m *HelpRequest) String() string { return proto.CompactTextString(m) }
    35  func (*HelpRequest) ProtoMessage()    {}
    36  func (*HelpRequest) Descriptor() ([]byte, []int) {
    37  	return fileDescriptor_79b974b8c77805fa, []int{0}
    38  }
    39  
    40  func (m *HelpRequest) XXX_Unmarshal(b []byte) error {
    41  	return xxx_messageInfo_HelpRequest.Unmarshal(m, b)
    42  }
    43  func (m *HelpRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    44  	return xxx_messageInfo_HelpRequest.Marshal(b, m, deterministic)
    45  }
    46  func (m *HelpRequest) XXX_Merge(src proto.Message) {
    47  	xxx_messageInfo_HelpRequest.Merge(m, src)
    48  }
    49  func (m *HelpRequest) XXX_Size() int {
    50  	return xxx_messageInfo_HelpRequest.Size(m)
    51  }
    52  func (m *HelpRequest) XXX_DiscardUnknown() {
    53  	xxx_messageInfo_HelpRequest.DiscardUnknown(m)
    54  }
    55  
    56  var xxx_messageInfo_HelpRequest proto.InternalMessageInfo
    57  
    58  type HelpResponse struct {
    59  	Usage                string   `protobuf:"bytes,1,opt,name=usage,proto3" json:"usage,omitempty"`
    60  	Description          string   `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
    61  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
    62  	XXX_unrecognized     []byte   `json:"-"`
    63  	XXX_sizecache        int32    `json:"-"`
    64  }
    65  
    66  func (m *HelpResponse) Reset()         { *m = HelpResponse{} }
    67  func (m *HelpResponse) String() string { return proto.CompactTextString(m) }
    68  func (*HelpResponse) ProtoMessage()    {}
    69  func (*HelpResponse) Descriptor() ([]byte, []int) {
    70  	return fileDescriptor_79b974b8c77805fa, []int{1}
    71  }
    72  
    73  func (m *HelpResponse) XXX_Unmarshal(b []byte) error {
    74  	return xxx_messageInfo_HelpResponse.Unmarshal(m, b)
    75  }
    76  func (m *HelpResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    77  	return xxx_messageInfo_HelpResponse.Marshal(b, m, deterministic)
    78  }
    79  func (m *HelpResponse) XXX_Merge(src proto.Message) {
    80  	xxx_messageInfo_HelpResponse.Merge(m, src)
    81  }
    82  func (m *HelpResponse) XXX_Size() int {
    83  	return xxx_messageInfo_HelpResponse.Size(m)
    84  }
    85  func (m *HelpResponse) XXX_DiscardUnknown() {
    86  	xxx_messageInfo_HelpResponse.DiscardUnknown(m)
    87  }
    88  
    89  var xxx_messageInfo_HelpResponse proto.InternalMessageInfo
    90  
    91  func (m *HelpResponse) GetUsage() string {
    92  	if m != nil {
    93  		return m.Usage
    94  	}
    95  	return ""
    96  }
    97  
    98  func (m *HelpResponse) GetDescription() string {
    99  	if m != nil {
   100  		return m.Description
   101  	}
   102  	return ""
   103  }
   104  
   105  type ExecRequest struct {
   106  	Args                 []string `protobuf:"bytes,1,rep,name=args,proto3" json:"args,omitempty"`
   107  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   108  	XXX_unrecognized     []byte   `json:"-"`
   109  	XXX_sizecache        int32    `json:"-"`
   110  }
   111  
   112  func (m *ExecRequest) Reset()         { *m = ExecRequest{} }
   113  func (m *ExecRequest) String() string { return proto.CompactTextString(m) }
   114  func (*ExecRequest) ProtoMessage()    {}
   115  func (*ExecRequest) Descriptor() ([]byte, []int) {
   116  	return fileDescriptor_79b974b8c77805fa, []int{2}
   117  }
   118  
   119  func (m *ExecRequest) XXX_Unmarshal(b []byte) error {
   120  	return xxx_messageInfo_ExecRequest.Unmarshal(m, b)
   121  }
   122  func (m *ExecRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   123  	return xxx_messageInfo_ExecRequest.Marshal(b, m, deterministic)
   124  }
   125  func (m *ExecRequest) XXX_Merge(src proto.Message) {
   126  	xxx_messageInfo_ExecRequest.Merge(m, src)
   127  }
   128  func (m *ExecRequest) XXX_Size() int {
   129  	return xxx_messageInfo_ExecRequest.Size(m)
   130  }
   131  func (m *ExecRequest) XXX_DiscardUnknown() {
   132  	xxx_messageInfo_ExecRequest.DiscardUnknown(m)
   133  }
   134  
   135  var xxx_messageInfo_ExecRequest proto.InternalMessageInfo
   136  
   137  func (m *ExecRequest) GetArgs() []string {
   138  	if m != nil {
   139  		return m.Args
   140  	}
   141  	return nil
   142  }
   143  
   144  type ExecResponse struct {
   145  	Result               []byte   `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
   146  	Error                string   `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
   147  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   148  	XXX_unrecognized     []byte   `json:"-"`
   149  	XXX_sizecache        int32    `json:"-"`
   150  }
   151  
   152  func (m *ExecResponse) Reset()         { *m = ExecResponse{} }
   153  func (m *ExecResponse) String() string { return proto.CompactTextString(m) }
   154  func (*ExecResponse) ProtoMessage()    {}
   155  func (*ExecResponse) Descriptor() ([]byte, []int) {
   156  	return fileDescriptor_79b974b8c77805fa, []int{3}
   157  }
   158  
   159  func (m *ExecResponse) XXX_Unmarshal(b []byte) error {
   160  	return xxx_messageInfo_ExecResponse.Unmarshal(m, b)
   161  }
   162  func (m *ExecResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   163  	return xxx_messageInfo_ExecResponse.Marshal(b, m, deterministic)
   164  }
   165  func (m *ExecResponse) XXX_Merge(src proto.Message) {
   166  	xxx_messageInfo_ExecResponse.Merge(m, src)
   167  }
   168  func (m *ExecResponse) XXX_Size() int {
   169  	return xxx_messageInfo_ExecResponse.Size(m)
   170  }
   171  func (m *ExecResponse) XXX_DiscardUnknown() {
   172  	xxx_messageInfo_ExecResponse.DiscardUnknown(m)
   173  }
   174  
   175  var xxx_messageInfo_ExecResponse proto.InternalMessageInfo
   176  
   177  func (m *ExecResponse) GetResult() []byte {
   178  	if m != nil {
   179  		return m.Result
   180  	}
   181  	return nil
   182  }
   183  
   184  func (m *ExecResponse) GetError() string {
   185  	if m != nil {
   186  		return m.Error
   187  	}
   188  	return ""
   189  }
   190  
   191  func init() {
   192  	proto.RegisterType((*HelpRequest)(nil), "go.micro.bot.HelpRequest")
   193  	proto.RegisterType((*HelpResponse)(nil), "go.micro.bot.HelpResponse")
   194  	proto.RegisterType((*ExecRequest)(nil), "go.micro.bot.ExecRequest")
   195  	proto.RegisterType((*ExecResponse)(nil), "go.micro.bot.ExecResponse")
   196  }
   197  
   198  func init() { proto.RegisterFile("agent/proto/bot.proto", fileDescriptor_79b974b8c77805fa) }
   199  
   200  var fileDescriptor_79b974b8c77805fa = []byte{
   201  	// 234 bytes of a gzipped FileDescriptorProto
   202  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0x3f, 0x4f, 0xc3, 0x30,
   203  	0x10, 0xc5, 0x1b, 0x28, 0x45, 0xbd, 0x84, 0xc5, 0x02, 0x14, 0x3a, 0x05, 0x4f, 0x9d, 0x5c, 0x09,
   204  	0x56, 0x24, 0x06, 0x04, 0x62, 0xce, 0x37, 0x48, 0xd2, 0x53, 0x14, 0xa9, 0xf1, 0x99, 0xb3, 0x23,
   205  	0xf1, 0x1d, 0xf8, 0xd2, 0xc8, 0x7f, 0x06, 0xab, 0xea, 0x76, 0xcf, 0x67, 0xbd, 0xf7, 0x7b, 0x07,
   206  	0x0f, 0xdd, 0x88, 0xda, 0x1d, 0x0c, 0x93, 0xa3, 0x43, 0x4f, 0x4e, 0x85, 0x49, 0x54, 0x23, 0xa9,
   207  	0x79, 0x1a, 0x98, 0x54, 0x4f, 0x4e, 0xde, 0x41, 0xf9, 0x8d, 0x27, 0xd3, 0xe2, 0xcf, 0x82, 0xd6,
   208  	0xc9, 0x2f, 0xa8, 0xa2, 0xb4, 0x86, 0xb4, 0x45, 0x71, 0x0f, 0x37, 0x8b, 0xed, 0x46, 0xac, 0x8b,
   209  	0xa6, 0xd8, 0x6f, 0xdb, 0x28, 0x44, 0x03, 0xe5, 0x11, 0xed, 0xc0, 0x93, 0x71, 0x13, 0xe9, 0xfa,
   210  	0x2a, 0xec, 0xf2, 0x27, 0xf9, 0x0c, 0xe5, 0xe7, 0x2f, 0x0e, 0xc9, 0x56, 0x08, 0x58, 0x77, 0x3c,
   211  	0xda, 0xba, 0x68, 0xae, 0xf7, 0xdb, 0x36, 0xcc, 0xf2, 0x0d, 0xaa, 0xf8, 0x25, 0x45, 0x3d, 0xc2,
   212  	0x86, 0xd1, 0x2e, 0x27, 0x17, 0xb2, 0xaa, 0x36, 0x29, 0x8f, 0x80, 0xcc, 0xc4, 0x29, 0x26, 0x8a,
   213  	0x97, 0xbf, 0x02, 0x6e, 0x3f, 0x68, 0x9e, 0x3b, 0x7d, 0x14, 0xef, 0xb0, 0xf6, 0xd0, 0xe2, 0x49,
   214  	0xe5, 0xd5, 0x54, 0xd6, 0x6b, 0xb7, 0xbb, 0xb4, 0x8a, 0xc1, 0x72, 0xe5, 0x0d, 0x3c, 0xca, 0xb9,
   215  	0x41, 0xd6, 0xe0, 0xdc, 0x20, 0x27, 0x97, 0xab, 0x7e, 0x13, 0x4e, 0xfb, 0xfa, 0x1f, 0x00, 0x00,
   216  	0xff, 0xff, 0xe8, 0x08, 0x5e, 0xad, 0x73, 0x01, 0x00, 0x00,
   217  }
   218  
   219  // Reference imports to suppress errors if they are not otherwise used.
   220  var _ context.Context
   221  var _ grpc.ClientConn
   222  
   223  // This is a compile-time assertion to ensure that this generated file
   224  // is compatible with the grpc package it is being compiled against.
   225  const _ = grpc.SupportPackageIsVersion4
   226  
   227  // CommandClient is the client API for Command service.
   228  //
   229  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   230  type CommandClient interface {
   231  	Help(ctx context.Context, in *HelpRequest, opts ...grpc.CallOption) (*HelpResponse, error)
   232  	Exec(ctx context.Context, in *ExecRequest, opts ...grpc.CallOption) (*ExecResponse, error)
   233  }
   234  
   235  type commandClient struct {
   236  	cc *grpc.ClientConn
   237  }
   238  
   239  func NewCommandClient(cc *grpc.ClientConn) CommandClient {
   240  	return &commandClient{cc}
   241  }
   242  
   243  func (c *commandClient) Help(ctx context.Context, in *HelpRequest, opts ...grpc.CallOption) (*HelpResponse, error) {
   244  	out := new(HelpResponse)
   245  	err := c.cc.Invoke(ctx, "/go.micro.bot.Command/Help", in, out, opts...)
   246  	if err != nil {
   247  		return nil, err
   248  	}
   249  	return out, nil
   250  }
   251  
   252  func (c *commandClient) Exec(ctx context.Context, in *ExecRequest, opts ...grpc.CallOption) (*ExecResponse, error) {
   253  	out := new(ExecResponse)
   254  	err := c.cc.Invoke(ctx, "/go.micro.bot.Command/Exec", in, out, opts...)
   255  	if err != nil {
   256  		return nil, err
   257  	}
   258  	return out, nil
   259  }
   260  
   261  // CommandServer is the server API for Command service.
   262  type CommandServer interface {
   263  	Help(context.Context, *HelpRequest) (*HelpResponse, error)
   264  	Exec(context.Context, *ExecRequest) (*ExecResponse, error)
   265  }
   266  
   267  // UnimplementedCommandServer can be embedded to have forward compatible implementations.
   268  type UnimplementedCommandServer struct {
   269  }
   270  
   271  func (*UnimplementedCommandServer) Help(ctx context.Context, req *HelpRequest) (*HelpResponse, error) {
   272  	return nil, status.Errorf(codes.Unimplemented, "method Help not implemented")
   273  }
   274  func (*UnimplementedCommandServer) Exec(ctx context.Context, req *ExecRequest) (*ExecResponse, error) {
   275  	return nil, status.Errorf(codes.Unimplemented, "method Exec not implemented")
   276  }
   277  
   278  func RegisterCommandServer(s *grpc.Server, srv CommandServer) {
   279  	s.RegisterService(&_Command_serviceDesc, srv)
   280  }
   281  
   282  func _Command_Help_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   283  	in := new(HelpRequest)
   284  	if err := dec(in); err != nil {
   285  		return nil, err
   286  	}
   287  	if interceptor == nil {
   288  		return srv.(CommandServer).Help(ctx, in)
   289  	}
   290  	info := &grpc.UnaryServerInfo{
   291  		Server:     srv,
   292  		FullMethod: "/go.micro.bot.Command/Help",
   293  	}
   294  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   295  		return srv.(CommandServer).Help(ctx, req.(*HelpRequest))
   296  	}
   297  	return interceptor(ctx, in, info, handler)
   298  }
   299  
   300  func _Command_Exec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   301  	in := new(ExecRequest)
   302  	if err := dec(in); err != nil {
   303  		return nil, err
   304  	}
   305  	if interceptor == nil {
   306  		return srv.(CommandServer).Exec(ctx, in)
   307  	}
   308  	info := &grpc.UnaryServerInfo{
   309  		Server:     srv,
   310  		FullMethod: "/go.micro.bot.Command/Exec",
   311  	}
   312  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   313  		return srv.(CommandServer).Exec(ctx, req.(*ExecRequest))
   314  	}
   315  	return interceptor(ctx, in, info, handler)
   316  }
   317  
   318  var _Command_serviceDesc = grpc.ServiceDesc{
   319  	ServiceName: "go.micro.bot.Command",
   320  	HandlerType: (*CommandServer)(nil),
   321  	Methods: []grpc.MethodDesc{
   322  		{
   323  			MethodName: "Help",
   324  			Handler:    _Command_Help_Handler,
   325  		},
   326  		{
   327  			MethodName: "Exec",
   328  			Handler:    _Command_Exec_Handler,
   329  		},
   330  	},
   331  	Streams:  []grpc.StreamDesc{},
   332  	Metadata: "agent/proto/bot.proto",
   333  }