You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
272 lines
11 KiB
272 lines
11 KiB
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.4.0
|
|
// - protoc v5.27.1
|
|
// source: matchmaking/v1/block/blockOrder.proto
|
|
|
|
package v1
|
|
|
|
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.62.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion8
|
|
|
|
const (
|
|
BlockTrade_GetBotStockBlockTrade_FullMethodName = "/matchmaking.v1.BlockTrade/GetBotStockBlockTrade"
|
|
BlockTrade_ShareBlockPlaceOrder_FullMethodName = "/matchmaking.v1.BlockTrade/ShareBlockPlaceOrder"
|
|
BlockTrade_ShareBlockUpdateOrder_FullMethodName = "/matchmaking.v1.BlockTrade/ShareBlockUpdateOrder"
|
|
BlockTrade_ShareBlockPosition_FullMethodName = "/matchmaking.v1.BlockTrade/ShareBlockPosition"
|
|
BlockTrade_ShareBlockCancel_FullMethodName = "/matchmaking.v1.BlockTrade/ShareBlockCancel"
|
|
)
|
|
|
|
// BlockTradeClient is the client API for BlockTrade 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 BlockTradeClient interface {
|
|
// GetBotStockBlockTrade 大宗交易股列表查询
|
|
GetBotStockBlockTrade(ctx context.Context, in *GetBotStockBlockTradeRequest, opts ...grpc.CallOption) (*GetBotStockBlockTradeReply, error)
|
|
// ShareBlockPlaceOrder 大宗交易股下单
|
|
ShareBlockPlaceOrder(ctx context.Context, in *OrderBlockRequest, opts ...grpc.CallOption) (*OrderBlockReply, error)
|
|
// ShareBlockUpdateOrder 大宗交易股设置止盈止损
|
|
ShareBlockUpdateOrder(ctx context.Context, in *UpdateBlockOrderRequest, opts ...grpc.CallOption) (*OrderBlockReply, error)
|
|
// ShareBlockPosition 大宗交易股平仓
|
|
ShareBlockPosition(ctx context.Context, in *CancelBlockOrderRequest, opts ...grpc.CallOption) (*OrderBlockReply, error)
|
|
// ShareBlockCancel 大宗交易股撤单
|
|
ShareBlockCancel(ctx context.Context, in *CancelBlockOrderRequest, opts ...grpc.CallOption) (*OrderBlockReply, error)
|
|
}
|
|
|
|
type blockTradeClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewBlockTradeClient(cc grpc.ClientConnInterface) BlockTradeClient {
|
|
return &blockTradeClient{cc}
|
|
}
|
|
|
|
func (c *blockTradeClient) GetBotStockBlockTrade(ctx context.Context, in *GetBotStockBlockTradeRequest, opts ...grpc.CallOption) (*GetBotStockBlockTradeReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetBotStockBlockTradeReply)
|
|
err := c.cc.Invoke(ctx, BlockTrade_GetBotStockBlockTrade_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *blockTradeClient) ShareBlockPlaceOrder(ctx context.Context, in *OrderBlockRequest, opts ...grpc.CallOption) (*OrderBlockReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(OrderBlockReply)
|
|
err := c.cc.Invoke(ctx, BlockTrade_ShareBlockPlaceOrder_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *blockTradeClient) ShareBlockUpdateOrder(ctx context.Context, in *UpdateBlockOrderRequest, opts ...grpc.CallOption) (*OrderBlockReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(OrderBlockReply)
|
|
err := c.cc.Invoke(ctx, BlockTrade_ShareBlockUpdateOrder_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *blockTradeClient) ShareBlockPosition(ctx context.Context, in *CancelBlockOrderRequest, opts ...grpc.CallOption) (*OrderBlockReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(OrderBlockReply)
|
|
err := c.cc.Invoke(ctx, BlockTrade_ShareBlockPosition_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *blockTradeClient) ShareBlockCancel(ctx context.Context, in *CancelBlockOrderRequest, opts ...grpc.CallOption) (*OrderBlockReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(OrderBlockReply)
|
|
err := c.cc.Invoke(ctx, BlockTrade_ShareBlockCancel_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// BlockTradeServer is the server API for BlockTrade service.
|
|
// All implementations must embed UnimplementedBlockTradeServer
|
|
// for forward compatibility
|
|
type BlockTradeServer interface {
|
|
// GetBotStockBlockTrade 大宗交易股列表查询
|
|
GetBotStockBlockTrade(context.Context, *GetBotStockBlockTradeRequest) (*GetBotStockBlockTradeReply, error)
|
|
// ShareBlockPlaceOrder 大宗交易股下单
|
|
ShareBlockPlaceOrder(context.Context, *OrderBlockRequest) (*OrderBlockReply, error)
|
|
// ShareBlockUpdateOrder 大宗交易股设置止盈止损
|
|
ShareBlockUpdateOrder(context.Context, *UpdateBlockOrderRequest) (*OrderBlockReply, error)
|
|
// ShareBlockPosition 大宗交易股平仓
|
|
ShareBlockPosition(context.Context, *CancelBlockOrderRequest) (*OrderBlockReply, error)
|
|
// ShareBlockCancel 大宗交易股撤单
|
|
ShareBlockCancel(context.Context, *CancelBlockOrderRequest) (*OrderBlockReply, error)
|
|
mustEmbedUnimplementedBlockTradeServer()
|
|
}
|
|
|
|
// UnimplementedBlockTradeServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedBlockTradeServer struct {
|
|
}
|
|
|
|
func (UnimplementedBlockTradeServer) GetBotStockBlockTrade(context.Context, *GetBotStockBlockTradeRequest) (*GetBotStockBlockTradeReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetBotStockBlockTrade not implemented")
|
|
}
|
|
func (UnimplementedBlockTradeServer) ShareBlockPlaceOrder(context.Context, *OrderBlockRequest) (*OrderBlockReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ShareBlockPlaceOrder not implemented")
|
|
}
|
|
func (UnimplementedBlockTradeServer) ShareBlockUpdateOrder(context.Context, *UpdateBlockOrderRequest) (*OrderBlockReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ShareBlockUpdateOrder not implemented")
|
|
}
|
|
func (UnimplementedBlockTradeServer) ShareBlockPosition(context.Context, *CancelBlockOrderRequest) (*OrderBlockReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ShareBlockPosition not implemented")
|
|
}
|
|
func (UnimplementedBlockTradeServer) ShareBlockCancel(context.Context, *CancelBlockOrderRequest) (*OrderBlockReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ShareBlockCancel not implemented")
|
|
}
|
|
func (UnimplementedBlockTradeServer) mustEmbedUnimplementedBlockTradeServer() {}
|
|
|
|
// UnsafeBlockTradeServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to BlockTradeServer will
|
|
// result in compilation errors.
|
|
type UnsafeBlockTradeServer interface {
|
|
mustEmbedUnimplementedBlockTradeServer()
|
|
}
|
|
|
|
func RegisterBlockTradeServer(s grpc.ServiceRegistrar, srv BlockTradeServer) {
|
|
s.RegisterService(&BlockTrade_ServiceDesc, srv)
|
|
}
|
|
|
|
func _BlockTrade_GetBotStockBlockTrade_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetBotStockBlockTradeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(BlockTradeServer).GetBotStockBlockTrade(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: BlockTrade_GetBotStockBlockTrade_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(BlockTradeServer).GetBotStockBlockTrade(ctx, req.(*GetBotStockBlockTradeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _BlockTrade_ShareBlockPlaceOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(OrderBlockRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(BlockTradeServer).ShareBlockPlaceOrder(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: BlockTrade_ShareBlockPlaceOrder_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(BlockTradeServer).ShareBlockPlaceOrder(ctx, req.(*OrderBlockRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _BlockTrade_ShareBlockUpdateOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateBlockOrderRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(BlockTradeServer).ShareBlockUpdateOrder(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: BlockTrade_ShareBlockUpdateOrder_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(BlockTradeServer).ShareBlockUpdateOrder(ctx, req.(*UpdateBlockOrderRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _BlockTrade_ShareBlockPosition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CancelBlockOrderRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(BlockTradeServer).ShareBlockPosition(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: BlockTrade_ShareBlockPosition_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(BlockTradeServer).ShareBlockPosition(ctx, req.(*CancelBlockOrderRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _BlockTrade_ShareBlockCancel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CancelBlockOrderRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(BlockTradeServer).ShareBlockCancel(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: BlockTrade_ShareBlockCancel_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(BlockTradeServer).ShareBlockCancel(ctx, req.(*CancelBlockOrderRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// BlockTrade_ServiceDesc is the grpc.ServiceDesc for BlockTrade service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var BlockTrade_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "matchmaking.v1.BlockTrade",
|
|
HandlerType: (*BlockTradeServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "GetBotStockBlockTrade",
|
|
Handler: _BlockTrade_GetBotStockBlockTrade_Handler,
|
|
},
|
|
{
|
|
MethodName: "ShareBlockPlaceOrder",
|
|
Handler: _BlockTrade_ShareBlockPlaceOrder_Handler,
|
|
},
|
|
{
|
|
MethodName: "ShareBlockUpdateOrder",
|
|
Handler: _BlockTrade_ShareBlockUpdateOrder_Handler,
|
|
},
|
|
{
|
|
MethodName: "ShareBlockPosition",
|
|
Handler: _BlockTrade_ShareBlockPosition_Handler,
|
|
},
|
|
{
|
|
MethodName: "ShareBlockCancel",
|
|
Handler: _BlockTrade_ShareBlockCancel_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "matchmaking/v1/block/blockOrder.proto",
|
|
}
|
|
|