// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc v4.24.3 // source: proto/plugin.proto package proto import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 const ( Plugin_Order_FullMethodName = "/proto.Plugin/Order" Plugin_Query_FullMethodName = "/proto.Plugin/Query" Plugin_Notify_FullMethodName = "/proto.Plugin/Notify" ) // PluginClient is the client API for Plugin service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type PluginClient interface { Order(ctx context.Context, in *OrderRequest, opts ...grpc.CallOption) (*OrderResponse, error) Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) Notify(ctx context.Context, in *NotifyRequest, opts ...grpc.CallOption) (*NotifyResponse, error) } type pluginClient struct { cc grpc.ClientConnInterface } func NewPluginClient(cc grpc.ClientConnInterface) PluginClient { return &pluginClient{cc} } func (c *pluginClient) Order(ctx context.Context, in *OrderRequest, opts ...grpc.CallOption) (*OrderResponse, error) { out := new(OrderResponse) err := c.cc.Invoke(ctx, Plugin_Order_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *pluginClient) Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) { out := new(QueryResponse) err := c.cc.Invoke(ctx, Plugin_Query_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *pluginClient) Notify(ctx context.Context, in *NotifyRequest, opts ...grpc.CallOption) (*NotifyResponse, error) { out := new(NotifyResponse) err := c.cc.Invoke(ctx, Plugin_Notify_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // PluginServer is the server API for Plugin service. // All implementations must embed UnimplementedPluginServer // for forward compatibility type PluginServer interface { Order(context.Context, *OrderRequest) (*OrderResponse, error) Query(context.Context, *QueryRequest) (*QueryResponse, error) Notify(context.Context, *NotifyRequest) (*NotifyResponse, error) mustEmbedUnimplementedPluginServer() } // UnimplementedPluginServer must be embedded to have forward compatible implementations. type UnimplementedPluginServer struct { } func (UnimplementedPluginServer) Order(context.Context, *OrderRequest) (*OrderResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Order not implemented") } func (UnimplementedPluginServer) Query(context.Context, *QueryRequest) (*QueryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Query not implemented") } func (UnimplementedPluginServer) Notify(context.Context, *NotifyRequest) (*NotifyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Notify not implemented") } func (UnimplementedPluginServer) mustEmbedUnimplementedPluginServer() {} // UnsafePluginServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to PluginServer will // result in compilation errors. type UnsafePluginServer interface { mustEmbedUnimplementedPluginServer() } func RegisterPluginServer(s grpc.ServiceRegistrar, srv PluginServer) { s.RegisterService(&Plugin_ServiceDesc, srv) } func _Plugin_Order_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(OrderRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PluginServer).Order(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Plugin_Order_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PluginServer).Order(ctx, req.(*OrderRequest)) } return interceptor(ctx, in, info, handler) } func _Plugin_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PluginServer).Query(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Plugin_Query_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PluginServer).Query(ctx, req.(*QueryRequest)) } return interceptor(ctx, in, info, handler) } func _Plugin_Notify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(NotifyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PluginServer).Notify(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Plugin_Notify_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PluginServer).Notify(ctx, req.(*NotifyRequest)) } return interceptor(ctx, in, info, handler) } // Plugin_ServiceDesc is the grpc.ServiceDesc for Plugin service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Plugin_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.Plugin", HandlerType: (*PluginServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Order", Handler: _Plugin_Order_Handler, }, { MethodName: "Query", Handler: _Plugin_Query_Handler, }, { MethodName: "Notify", Handler: _Plugin_Notify_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/plugin.proto", }