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.
312 lines
12 KiB
312 lines
12 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/share/shareUs.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 (
|
|
ShareUs_GetBotStockTrade_FullMethodName = "/matchmaking.v1.ShareUs/GetBotStockTrade"
|
|
ShareUs_SharePlaceOrder_FullMethodName = "/matchmaking.v1.ShareUs/SharePlaceOrder"
|
|
ShareUs_ShareUpdateOrder_FullMethodName = "/matchmaking.v1.ShareUs/ShareUpdateOrder"
|
|
ShareUs_SharePosition_FullMethodName = "/matchmaking.v1.ShareUs/SharePosition"
|
|
ShareUs_ShareAllPosition_FullMethodName = "/matchmaking.v1.ShareUs/ShareAllPosition"
|
|
ShareUs_ShareCancel_FullMethodName = "/matchmaking.v1.ShareUs/ShareCancel"
|
|
)
|
|
|
|
// ShareUsClient is the client API for ShareUs 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 ShareUsClient interface {
|
|
// GetBotStockTrade 美股列表查询
|
|
GetBotStockTrade(ctx context.Context, in *GetUsBotStockTradeRequest, opts ...grpc.CallOption) (*GetUsBotStockTradeReply, error)
|
|
// SharePlaceOrder 美股下单
|
|
SharePlaceOrder(ctx context.Context, in *UsOrderRequest, opts ...grpc.CallOption) (*UsOrderReply, error)
|
|
// ShareUpdateOrder 美股设置止盈止损
|
|
ShareUpdateOrder(ctx context.Context, in *UpdateUsOrderRequest, opts ...grpc.CallOption) (*UsOrderReply, error)
|
|
// SharePosition 美股平仓
|
|
SharePosition(ctx context.Context, in *CancelUsOrderRequest, opts ...grpc.CallOption) (*UsOrderReply, error)
|
|
// ShareCancel 美股一键平仓
|
|
ShareAllPosition(ctx context.Context, in *AllUsOrderRequest, opts ...grpc.CallOption) (*AllUsOrderReply, error)
|
|
// ShareCancel 美股撤单
|
|
ShareCancel(ctx context.Context, in *CancelUsOrderRequest, opts ...grpc.CallOption) (*UsOrderReply, error)
|
|
}
|
|
|
|
type shareUsClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewShareUsClient(cc grpc.ClientConnInterface) ShareUsClient {
|
|
return &shareUsClient{cc}
|
|
}
|
|
|
|
func (c *shareUsClient) GetBotStockTrade(ctx context.Context, in *GetUsBotStockTradeRequest, opts ...grpc.CallOption) (*GetUsBotStockTradeReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetUsBotStockTradeReply)
|
|
err := c.cc.Invoke(ctx, ShareUs_GetBotStockTrade_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *shareUsClient) SharePlaceOrder(ctx context.Context, in *UsOrderRequest, opts ...grpc.CallOption) (*UsOrderReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(UsOrderReply)
|
|
err := c.cc.Invoke(ctx, ShareUs_SharePlaceOrder_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *shareUsClient) ShareUpdateOrder(ctx context.Context, in *UpdateUsOrderRequest, opts ...grpc.CallOption) (*UsOrderReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(UsOrderReply)
|
|
err := c.cc.Invoke(ctx, ShareUs_ShareUpdateOrder_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *shareUsClient) SharePosition(ctx context.Context, in *CancelUsOrderRequest, opts ...grpc.CallOption) (*UsOrderReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(UsOrderReply)
|
|
err := c.cc.Invoke(ctx, ShareUs_SharePosition_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *shareUsClient) ShareAllPosition(ctx context.Context, in *AllUsOrderRequest, opts ...grpc.CallOption) (*AllUsOrderReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(AllUsOrderReply)
|
|
err := c.cc.Invoke(ctx, ShareUs_ShareAllPosition_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *shareUsClient) ShareCancel(ctx context.Context, in *CancelUsOrderRequest, opts ...grpc.CallOption) (*UsOrderReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(UsOrderReply)
|
|
err := c.cc.Invoke(ctx, ShareUs_ShareCancel_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// ShareUsServer is the server API for ShareUs service.
|
|
// All implementations must embed UnimplementedShareUsServer
|
|
// for forward compatibility
|
|
type ShareUsServer interface {
|
|
// GetBotStockTrade 美股列表查询
|
|
GetBotStockTrade(context.Context, *GetUsBotStockTradeRequest) (*GetUsBotStockTradeReply, error)
|
|
// SharePlaceOrder 美股下单
|
|
SharePlaceOrder(context.Context, *UsOrderRequest) (*UsOrderReply, error)
|
|
// ShareUpdateOrder 美股设置止盈止损
|
|
ShareUpdateOrder(context.Context, *UpdateUsOrderRequest) (*UsOrderReply, error)
|
|
// SharePosition 美股平仓
|
|
SharePosition(context.Context, *CancelUsOrderRequest) (*UsOrderReply, error)
|
|
// ShareCancel 美股一键平仓
|
|
ShareAllPosition(context.Context, *AllUsOrderRequest) (*AllUsOrderReply, error)
|
|
// ShareCancel 美股撤单
|
|
ShareCancel(context.Context, *CancelUsOrderRequest) (*UsOrderReply, error)
|
|
mustEmbedUnimplementedShareUsServer()
|
|
}
|
|
|
|
// UnimplementedShareUsServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedShareUsServer struct {
|
|
}
|
|
|
|
func (UnimplementedShareUsServer) GetBotStockTrade(context.Context, *GetUsBotStockTradeRequest) (*GetUsBotStockTradeReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetBotStockTrade not implemented")
|
|
}
|
|
func (UnimplementedShareUsServer) SharePlaceOrder(context.Context, *UsOrderRequest) (*UsOrderReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method SharePlaceOrder not implemented")
|
|
}
|
|
func (UnimplementedShareUsServer) ShareUpdateOrder(context.Context, *UpdateUsOrderRequest) (*UsOrderReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ShareUpdateOrder not implemented")
|
|
}
|
|
func (UnimplementedShareUsServer) SharePosition(context.Context, *CancelUsOrderRequest) (*UsOrderReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method SharePosition not implemented")
|
|
}
|
|
func (UnimplementedShareUsServer) ShareAllPosition(context.Context, *AllUsOrderRequest) (*AllUsOrderReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ShareAllPosition not implemented")
|
|
}
|
|
func (UnimplementedShareUsServer) ShareCancel(context.Context, *CancelUsOrderRequest) (*UsOrderReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ShareCancel not implemented")
|
|
}
|
|
func (UnimplementedShareUsServer) mustEmbedUnimplementedShareUsServer() {}
|
|
|
|
// UnsafeShareUsServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to ShareUsServer will
|
|
// result in compilation errors.
|
|
type UnsafeShareUsServer interface {
|
|
mustEmbedUnimplementedShareUsServer()
|
|
}
|
|
|
|
func RegisterShareUsServer(s grpc.ServiceRegistrar, srv ShareUsServer) {
|
|
s.RegisterService(&ShareUs_ServiceDesc, srv)
|
|
}
|
|
|
|
func _ShareUs_GetBotStockTrade_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetUsBotStockTradeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ShareUsServer).GetBotStockTrade(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ShareUs_GetBotStockTrade_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ShareUsServer).GetBotStockTrade(ctx, req.(*GetUsBotStockTradeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ShareUs_SharePlaceOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UsOrderRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ShareUsServer).SharePlaceOrder(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ShareUs_SharePlaceOrder_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ShareUsServer).SharePlaceOrder(ctx, req.(*UsOrderRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ShareUs_ShareUpdateOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateUsOrderRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ShareUsServer).ShareUpdateOrder(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ShareUs_ShareUpdateOrder_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ShareUsServer).ShareUpdateOrder(ctx, req.(*UpdateUsOrderRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ShareUs_SharePosition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CancelUsOrderRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ShareUsServer).SharePosition(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ShareUs_SharePosition_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ShareUsServer).SharePosition(ctx, req.(*CancelUsOrderRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ShareUs_ShareAllPosition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(AllUsOrderRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ShareUsServer).ShareAllPosition(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ShareUs_ShareAllPosition_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ShareUsServer).ShareAllPosition(ctx, req.(*AllUsOrderRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ShareUs_ShareCancel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CancelUsOrderRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ShareUsServer).ShareCancel(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ShareUs_ShareCancel_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ShareUsServer).ShareCancel(ctx, req.(*CancelUsOrderRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// ShareUs_ServiceDesc is the grpc.ServiceDesc for ShareUs service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var ShareUs_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "matchmaking.v1.ShareUs",
|
|
HandlerType: (*ShareUsServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "GetBotStockTrade",
|
|
Handler: _ShareUs_GetBotStockTrade_Handler,
|
|
},
|
|
{
|
|
MethodName: "SharePlaceOrder",
|
|
Handler: _ShareUs_SharePlaceOrder_Handler,
|
|
},
|
|
{
|
|
MethodName: "ShareUpdateOrder",
|
|
Handler: _ShareUs_ShareUpdateOrder_Handler,
|
|
},
|
|
{
|
|
MethodName: "SharePosition",
|
|
Handler: _ShareUs_SharePosition_Handler,
|
|
},
|
|
{
|
|
MethodName: "ShareAllPosition",
|
|
Handler: _ShareUs_ShareAllPosition_Handler,
|
|
},
|
|
{
|
|
MethodName: "ShareCancel",
|
|
Handler: _ShareUs_ShareCancel_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "matchmaking/v1/share/shareUs.proto",
|
|
}
|
|
|