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/shareJpy.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 (
|
|
ShareJpy_GetBotStockJpyTrade_FullMethodName = "/matchmaking.v1.ShareJpy/GetBotStockJpyTrade"
|
|
ShareJpy_ShareJpyPlaceOrder_FullMethodName = "/matchmaking.v1.ShareJpy/ShareJpyPlaceOrder"
|
|
ShareJpy_ShareJpyUpdateOrder_FullMethodName = "/matchmaking.v1.ShareJpy/ShareJpyUpdateOrder"
|
|
ShareJpy_ShareJpyPosition_FullMethodName = "/matchmaking.v1.ShareJpy/ShareJpyPosition"
|
|
ShareJpy_ShareJpyAllPosition_FullMethodName = "/matchmaking.v1.ShareJpy/ShareJpyAllPosition"
|
|
ShareJpy_ShareJpyCancel_FullMethodName = "/matchmaking.v1.ShareJpy/ShareJpyCancel"
|
|
)
|
|
|
|
// ShareJpyClient is the client API for ShareJpy 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 ShareJpyClient interface {
|
|
// GetBotStockJpyTrade 日本股列表查询
|
|
GetBotStockJpyTrade(ctx context.Context, in *GetJpyBotStockTradeRequest, opts ...grpc.CallOption) (*GetBotStockJpyTradeReply, error)
|
|
// ShareJpyPlaceOrder 日本股下单
|
|
ShareJpyPlaceOrder(ctx context.Context, in *ShareJpyOrderRequest, opts ...grpc.CallOption) (*JpyOrderReply, error)
|
|
// ShareJpyUpdateOrder 日本股设置止盈止损
|
|
ShareJpyUpdateOrder(ctx context.Context, in *UpdateJpyOrderRequest, opts ...grpc.CallOption) (*JpyOrderReply, error)
|
|
// ShareJpyPosition 日本股平仓
|
|
ShareJpyPosition(ctx context.Context, in *CancelJpyOrderRequest, opts ...grpc.CallOption) (*JpyOrderReply, error)
|
|
// ShareJpyAllPosition 日本股一键平仓
|
|
ShareJpyAllPosition(ctx context.Context, in *AllJpyOrderRequest, opts ...grpc.CallOption) (*AllJpyOrderReply, error)
|
|
// ShareJpyCancel 日本股撤单
|
|
ShareJpyCancel(ctx context.Context, in *CancelJpyOrderRequest, opts ...grpc.CallOption) (*JpyOrderReply, error)
|
|
}
|
|
|
|
type shareJpyClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewShareJpyClient(cc grpc.ClientConnInterface) ShareJpyClient {
|
|
return &shareJpyClient{cc}
|
|
}
|
|
|
|
func (c *shareJpyClient) GetBotStockJpyTrade(ctx context.Context, in *GetJpyBotStockTradeRequest, opts ...grpc.CallOption) (*GetBotStockJpyTradeReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetBotStockJpyTradeReply)
|
|
err := c.cc.Invoke(ctx, ShareJpy_GetBotStockJpyTrade_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *shareJpyClient) ShareJpyPlaceOrder(ctx context.Context, in *ShareJpyOrderRequest, opts ...grpc.CallOption) (*JpyOrderReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(JpyOrderReply)
|
|
err := c.cc.Invoke(ctx, ShareJpy_ShareJpyPlaceOrder_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *shareJpyClient) ShareJpyUpdateOrder(ctx context.Context, in *UpdateJpyOrderRequest, opts ...grpc.CallOption) (*JpyOrderReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(JpyOrderReply)
|
|
err := c.cc.Invoke(ctx, ShareJpy_ShareJpyUpdateOrder_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *shareJpyClient) ShareJpyPosition(ctx context.Context, in *CancelJpyOrderRequest, opts ...grpc.CallOption) (*JpyOrderReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(JpyOrderReply)
|
|
err := c.cc.Invoke(ctx, ShareJpy_ShareJpyPosition_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *shareJpyClient) ShareJpyAllPosition(ctx context.Context, in *AllJpyOrderRequest, opts ...grpc.CallOption) (*AllJpyOrderReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(AllJpyOrderReply)
|
|
err := c.cc.Invoke(ctx, ShareJpy_ShareJpyAllPosition_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *shareJpyClient) ShareJpyCancel(ctx context.Context, in *CancelJpyOrderRequest, opts ...grpc.CallOption) (*JpyOrderReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(JpyOrderReply)
|
|
err := c.cc.Invoke(ctx, ShareJpy_ShareJpyCancel_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// ShareJpyServer is the server API for ShareJpy service.
|
|
// All implementations must embed UnimplementedShareJpyServer
|
|
// for forward compatibility
|
|
type ShareJpyServer interface {
|
|
// GetBotStockJpyTrade 日本股列表查询
|
|
GetBotStockJpyTrade(context.Context, *GetJpyBotStockTradeRequest) (*GetBotStockJpyTradeReply, error)
|
|
// ShareJpyPlaceOrder 日本股下单
|
|
ShareJpyPlaceOrder(context.Context, *ShareJpyOrderRequest) (*JpyOrderReply, error)
|
|
// ShareJpyUpdateOrder 日本股设置止盈止损
|
|
ShareJpyUpdateOrder(context.Context, *UpdateJpyOrderRequest) (*JpyOrderReply, error)
|
|
// ShareJpyPosition 日本股平仓
|
|
ShareJpyPosition(context.Context, *CancelJpyOrderRequest) (*JpyOrderReply, error)
|
|
// ShareJpyAllPosition 日本股一键平仓
|
|
ShareJpyAllPosition(context.Context, *AllJpyOrderRequest) (*AllJpyOrderReply, error)
|
|
// ShareJpyCancel 日本股撤单
|
|
ShareJpyCancel(context.Context, *CancelJpyOrderRequest) (*JpyOrderReply, error)
|
|
mustEmbedUnimplementedShareJpyServer()
|
|
}
|
|
|
|
// UnimplementedShareJpyServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedShareJpyServer struct {
|
|
}
|
|
|
|
func (UnimplementedShareJpyServer) GetBotStockJpyTrade(context.Context, *GetJpyBotStockTradeRequest) (*GetBotStockJpyTradeReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetBotStockJpyTrade not implemented")
|
|
}
|
|
func (UnimplementedShareJpyServer) ShareJpyPlaceOrder(context.Context, *ShareJpyOrderRequest) (*JpyOrderReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ShareJpyPlaceOrder not implemented")
|
|
}
|
|
func (UnimplementedShareJpyServer) ShareJpyUpdateOrder(context.Context, *UpdateJpyOrderRequest) (*JpyOrderReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ShareJpyUpdateOrder not implemented")
|
|
}
|
|
func (UnimplementedShareJpyServer) ShareJpyPosition(context.Context, *CancelJpyOrderRequest) (*JpyOrderReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ShareJpyPosition not implemented")
|
|
}
|
|
func (UnimplementedShareJpyServer) ShareJpyAllPosition(context.Context, *AllJpyOrderRequest) (*AllJpyOrderReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ShareJpyAllPosition not implemented")
|
|
}
|
|
func (UnimplementedShareJpyServer) ShareJpyCancel(context.Context, *CancelJpyOrderRequest) (*JpyOrderReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ShareJpyCancel not implemented")
|
|
}
|
|
func (UnimplementedShareJpyServer) mustEmbedUnimplementedShareJpyServer() {}
|
|
|
|
// UnsafeShareJpyServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to ShareJpyServer will
|
|
// result in compilation errors.
|
|
type UnsafeShareJpyServer interface {
|
|
mustEmbedUnimplementedShareJpyServer()
|
|
}
|
|
|
|
func RegisterShareJpyServer(s grpc.ServiceRegistrar, srv ShareJpyServer) {
|
|
s.RegisterService(&ShareJpy_ServiceDesc, srv)
|
|
}
|
|
|
|
func _ShareJpy_GetBotStockJpyTrade_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetJpyBotStockTradeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ShareJpyServer).GetBotStockJpyTrade(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ShareJpy_GetBotStockJpyTrade_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ShareJpyServer).GetBotStockJpyTrade(ctx, req.(*GetJpyBotStockTradeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ShareJpy_ShareJpyPlaceOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ShareJpyOrderRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ShareJpyServer).ShareJpyPlaceOrder(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ShareJpy_ShareJpyPlaceOrder_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ShareJpyServer).ShareJpyPlaceOrder(ctx, req.(*ShareJpyOrderRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ShareJpy_ShareJpyUpdateOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateJpyOrderRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ShareJpyServer).ShareJpyUpdateOrder(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ShareJpy_ShareJpyUpdateOrder_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ShareJpyServer).ShareJpyUpdateOrder(ctx, req.(*UpdateJpyOrderRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ShareJpy_ShareJpyPosition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CancelJpyOrderRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ShareJpyServer).ShareJpyPosition(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ShareJpy_ShareJpyPosition_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ShareJpyServer).ShareJpyPosition(ctx, req.(*CancelJpyOrderRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ShareJpy_ShareJpyAllPosition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(AllJpyOrderRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ShareJpyServer).ShareJpyAllPosition(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ShareJpy_ShareJpyAllPosition_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ShareJpyServer).ShareJpyAllPosition(ctx, req.(*AllJpyOrderRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ShareJpy_ShareJpyCancel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CancelJpyOrderRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ShareJpyServer).ShareJpyCancel(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ShareJpy_ShareJpyCancel_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ShareJpyServer).ShareJpyCancel(ctx, req.(*CancelJpyOrderRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// ShareJpy_ServiceDesc is the grpc.ServiceDesc for ShareJpy service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var ShareJpy_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "matchmaking.v1.ShareJpy",
|
|
HandlerType: (*ShareJpyServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "GetBotStockJpyTrade",
|
|
Handler: _ShareJpy_GetBotStockJpyTrade_Handler,
|
|
},
|
|
{
|
|
MethodName: "ShareJpyPlaceOrder",
|
|
Handler: _ShareJpy_ShareJpyPlaceOrder_Handler,
|
|
},
|
|
{
|
|
MethodName: "ShareJpyUpdateOrder",
|
|
Handler: _ShareJpy_ShareJpyUpdateOrder_Handler,
|
|
},
|
|
{
|
|
MethodName: "ShareJpyPosition",
|
|
Handler: _ShareJpy_ShareJpyPosition_Handler,
|
|
},
|
|
{
|
|
MethodName: "ShareJpyAllPosition",
|
|
Handler: _ShareJpy_ShareJpyAllPosition_Handler,
|
|
},
|
|
{
|
|
MethodName: "ShareJpyCancel",
|
|
Handler: _ShareJpy_ShareJpyCancel_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "matchmaking/v1/share/shareJpy.proto",
|
|
}
|
|
|