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/shareTha.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 (
|
|
ShareTha_GetBotStockThaTrade_FullMethodName = "/matchmaking.v1.ShareTha/GetBotStockThaTrade"
|
|
ShareTha_ShareThaPlaceOrder_FullMethodName = "/matchmaking.v1.ShareTha/ShareThaPlaceOrder"
|
|
ShareTha_ShareThaUpdateOrder_FullMethodName = "/matchmaking.v1.ShareTha/ShareThaUpdateOrder"
|
|
ShareTha_ShareThaPosition_FullMethodName = "/matchmaking.v1.ShareTha/ShareThaPosition"
|
|
ShareTha_ShareThaAllPosition_FullMethodName = "/matchmaking.v1.ShareTha/ShareThaAllPosition"
|
|
ShareTha_ShareThaCancel_FullMethodName = "/matchmaking.v1.ShareTha/ShareThaCancel"
|
|
)
|
|
|
|
// ShareThaClient is the client API for ShareTha 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 ShareThaClient interface {
|
|
// GetBotStockThaTrade 泰股列表查询
|
|
GetBotStockThaTrade(ctx context.Context, in *GetThaBotStockTradeRequest, opts ...grpc.CallOption) (*GetBotStockThaTradeReply, error)
|
|
// ShareThaPlaceOrder 泰股下单
|
|
ShareThaPlaceOrder(ctx context.Context, in *ShareThaOrderRequest, opts ...grpc.CallOption) (*ThaOrderReply, error)
|
|
// ShareThaUpdateOrder 泰股设置止盈止损
|
|
ShareThaUpdateOrder(ctx context.Context, in *UpdateThaOrderRequest, opts ...grpc.CallOption) (*ThaOrderReply, error)
|
|
// ShareThaPosition 泰股平仓
|
|
ShareThaPosition(ctx context.Context, in *CancelThaOrderRequest, opts ...grpc.CallOption) (*ThaOrderReply, error)
|
|
// ShareThaAllPosition 泰股一键平仓
|
|
ShareThaAllPosition(ctx context.Context, in *AllThaOrderRequest, opts ...grpc.CallOption) (*AllThaOrderReply, error)
|
|
// ShareThaCancel 泰股撤单
|
|
ShareThaCancel(ctx context.Context, in *CancelThaOrderRequest, opts ...grpc.CallOption) (*ThaOrderReply, error)
|
|
}
|
|
|
|
type shareThaClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewShareThaClient(cc grpc.ClientConnInterface) ShareThaClient {
|
|
return &shareThaClient{cc}
|
|
}
|
|
|
|
func (c *shareThaClient) GetBotStockThaTrade(ctx context.Context, in *GetThaBotStockTradeRequest, opts ...grpc.CallOption) (*GetBotStockThaTradeReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetBotStockThaTradeReply)
|
|
err := c.cc.Invoke(ctx, ShareTha_GetBotStockThaTrade_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *shareThaClient) ShareThaPlaceOrder(ctx context.Context, in *ShareThaOrderRequest, opts ...grpc.CallOption) (*ThaOrderReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ThaOrderReply)
|
|
err := c.cc.Invoke(ctx, ShareTha_ShareThaPlaceOrder_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *shareThaClient) ShareThaUpdateOrder(ctx context.Context, in *UpdateThaOrderRequest, opts ...grpc.CallOption) (*ThaOrderReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ThaOrderReply)
|
|
err := c.cc.Invoke(ctx, ShareTha_ShareThaUpdateOrder_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *shareThaClient) ShareThaPosition(ctx context.Context, in *CancelThaOrderRequest, opts ...grpc.CallOption) (*ThaOrderReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ThaOrderReply)
|
|
err := c.cc.Invoke(ctx, ShareTha_ShareThaPosition_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *shareThaClient) ShareThaAllPosition(ctx context.Context, in *AllThaOrderRequest, opts ...grpc.CallOption) (*AllThaOrderReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(AllThaOrderReply)
|
|
err := c.cc.Invoke(ctx, ShareTha_ShareThaAllPosition_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *shareThaClient) ShareThaCancel(ctx context.Context, in *CancelThaOrderRequest, opts ...grpc.CallOption) (*ThaOrderReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ThaOrderReply)
|
|
err := c.cc.Invoke(ctx, ShareTha_ShareThaCancel_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// ShareThaServer is the server API for ShareTha service.
|
|
// All implementations must embed UnimplementedShareThaServer
|
|
// for forward compatibility
|
|
type ShareThaServer interface {
|
|
// GetBotStockThaTrade 泰股列表查询
|
|
GetBotStockThaTrade(context.Context, *GetThaBotStockTradeRequest) (*GetBotStockThaTradeReply, error)
|
|
// ShareThaPlaceOrder 泰股下单
|
|
ShareThaPlaceOrder(context.Context, *ShareThaOrderRequest) (*ThaOrderReply, error)
|
|
// ShareThaUpdateOrder 泰股设置止盈止损
|
|
ShareThaUpdateOrder(context.Context, *UpdateThaOrderRequest) (*ThaOrderReply, error)
|
|
// ShareThaPosition 泰股平仓
|
|
ShareThaPosition(context.Context, *CancelThaOrderRequest) (*ThaOrderReply, error)
|
|
// ShareThaAllPosition 泰股一键平仓
|
|
ShareThaAllPosition(context.Context, *AllThaOrderRequest) (*AllThaOrderReply, error)
|
|
// ShareThaCancel 泰股撤单
|
|
ShareThaCancel(context.Context, *CancelThaOrderRequest) (*ThaOrderReply, error)
|
|
mustEmbedUnimplementedShareThaServer()
|
|
}
|
|
|
|
// UnimplementedShareThaServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedShareThaServer struct {
|
|
}
|
|
|
|
func (UnimplementedShareThaServer) GetBotStockThaTrade(context.Context, *GetThaBotStockTradeRequest) (*GetBotStockThaTradeReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetBotStockThaTrade not implemented")
|
|
}
|
|
func (UnimplementedShareThaServer) ShareThaPlaceOrder(context.Context, *ShareThaOrderRequest) (*ThaOrderReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ShareThaPlaceOrder not implemented")
|
|
}
|
|
func (UnimplementedShareThaServer) ShareThaUpdateOrder(context.Context, *UpdateThaOrderRequest) (*ThaOrderReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ShareThaUpdateOrder not implemented")
|
|
}
|
|
func (UnimplementedShareThaServer) ShareThaPosition(context.Context, *CancelThaOrderRequest) (*ThaOrderReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ShareThaPosition not implemented")
|
|
}
|
|
func (UnimplementedShareThaServer) ShareThaAllPosition(context.Context, *AllThaOrderRequest) (*AllThaOrderReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ShareThaAllPosition not implemented")
|
|
}
|
|
func (UnimplementedShareThaServer) ShareThaCancel(context.Context, *CancelThaOrderRequest) (*ThaOrderReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ShareThaCancel not implemented")
|
|
}
|
|
func (UnimplementedShareThaServer) mustEmbedUnimplementedShareThaServer() {}
|
|
|
|
// UnsafeShareThaServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to ShareThaServer will
|
|
// result in compilation errors.
|
|
type UnsafeShareThaServer interface {
|
|
mustEmbedUnimplementedShareThaServer()
|
|
}
|
|
|
|
func RegisterShareThaServer(s grpc.ServiceRegistrar, srv ShareThaServer) {
|
|
s.RegisterService(&ShareTha_ServiceDesc, srv)
|
|
}
|
|
|
|
func _ShareTha_GetBotStockThaTrade_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetThaBotStockTradeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ShareThaServer).GetBotStockThaTrade(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ShareTha_GetBotStockThaTrade_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ShareThaServer).GetBotStockThaTrade(ctx, req.(*GetThaBotStockTradeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ShareTha_ShareThaPlaceOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ShareThaOrderRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ShareThaServer).ShareThaPlaceOrder(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ShareTha_ShareThaPlaceOrder_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ShareThaServer).ShareThaPlaceOrder(ctx, req.(*ShareThaOrderRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ShareTha_ShareThaUpdateOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateThaOrderRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ShareThaServer).ShareThaUpdateOrder(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ShareTha_ShareThaUpdateOrder_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ShareThaServer).ShareThaUpdateOrder(ctx, req.(*UpdateThaOrderRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ShareTha_ShareThaPosition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CancelThaOrderRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ShareThaServer).ShareThaPosition(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ShareTha_ShareThaPosition_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ShareThaServer).ShareThaPosition(ctx, req.(*CancelThaOrderRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ShareTha_ShareThaAllPosition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(AllThaOrderRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ShareThaServer).ShareThaAllPosition(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ShareTha_ShareThaAllPosition_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ShareThaServer).ShareThaAllPosition(ctx, req.(*AllThaOrderRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ShareTha_ShareThaCancel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CancelThaOrderRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ShareThaServer).ShareThaCancel(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ShareTha_ShareThaCancel_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ShareThaServer).ShareThaCancel(ctx, req.(*CancelThaOrderRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// ShareTha_ServiceDesc is the grpc.ServiceDesc for ShareTha service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var ShareTha_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "matchmaking.v1.ShareTha",
|
|
HandlerType: (*ShareThaServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "GetBotStockThaTrade",
|
|
Handler: _ShareTha_GetBotStockThaTrade_Handler,
|
|
},
|
|
{
|
|
MethodName: "ShareThaPlaceOrder",
|
|
Handler: _ShareTha_ShareThaPlaceOrder_Handler,
|
|
},
|
|
{
|
|
MethodName: "ShareThaUpdateOrder",
|
|
Handler: _ShareTha_ShareThaUpdateOrder_Handler,
|
|
},
|
|
{
|
|
MethodName: "ShareThaPosition",
|
|
Handler: _ShareTha_ShareThaPosition_Handler,
|
|
},
|
|
{
|
|
MethodName: "ShareThaAllPosition",
|
|
Handler: _ShareTha_ShareThaAllPosition_Handler,
|
|
},
|
|
{
|
|
MethodName: "ShareThaCancel",
|
|
Handler: _ShareTha_ShareThaCancel_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "matchmaking/v1/share/shareTha.proto",
|
|
}
|
|
|