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/forex/forex.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 (
|
|
Forex_GetBotForexTrade_FullMethodName = "/matchmaking.v1.Forex/GetBotForexTrade"
|
|
Forex_ForexPlaceOrder_FullMethodName = "/matchmaking.v1.Forex/ForexPlaceOrder"
|
|
Forex_ForexUpdatePlaceOrder_FullMethodName = "/matchmaking.v1.Forex/ForexUpdatePlaceOrder"
|
|
Forex_ForexPosition_FullMethodName = "/matchmaking.v1.Forex/ForexPosition"
|
|
Forex_ForexAllPosition_FullMethodName = "/matchmaking.v1.Forex/ForexAllPosition"
|
|
Forex_ForexCancel_FullMethodName = "/matchmaking.v1.Forex/ForexCancel"
|
|
)
|
|
|
|
// ForexClient is the client API for Forex 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 ForexClient interface {
|
|
// GetBotForexTrade 外汇列表查询
|
|
GetBotForexTrade(ctx context.Context, in *GetBotForexTradeRequest, opts ...grpc.CallOption) (*GetBotForexTradeReply, error)
|
|
// ForexPlaceOrder 外汇下单
|
|
ForexPlaceOrder(ctx context.Context, in *ForexRequest, opts ...grpc.CallOption) (*ForexReply, error)
|
|
// ForexUpdatePlaceOrder 外汇设置止盈止损
|
|
ForexUpdatePlaceOrder(ctx context.Context, in *UpdateForexRequest, opts ...grpc.CallOption) (*ForexReply, error)
|
|
// ForexPosition 外汇平仓
|
|
ForexPosition(ctx context.Context, in *CancelForexRequest, opts ...grpc.CallOption) (*ForexReply, error)
|
|
// ForexAllPosition 外汇一键平仓
|
|
ForexAllPosition(ctx context.Context, in *AllForexRequest, opts ...grpc.CallOption) (*AllForexReply, error)
|
|
// ForexCancel 外汇撤单
|
|
ForexCancel(ctx context.Context, in *CancelForexRequest, opts ...grpc.CallOption) (*ForexReply, error)
|
|
}
|
|
|
|
type forexClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewForexClient(cc grpc.ClientConnInterface) ForexClient {
|
|
return &forexClient{cc}
|
|
}
|
|
|
|
func (c *forexClient) GetBotForexTrade(ctx context.Context, in *GetBotForexTradeRequest, opts ...grpc.CallOption) (*GetBotForexTradeReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetBotForexTradeReply)
|
|
err := c.cc.Invoke(ctx, Forex_GetBotForexTrade_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *forexClient) ForexPlaceOrder(ctx context.Context, in *ForexRequest, opts ...grpc.CallOption) (*ForexReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ForexReply)
|
|
err := c.cc.Invoke(ctx, Forex_ForexPlaceOrder_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *forexClient) ForexUpdatePlaceOrder(ctx context.Context, in *UpdateForexRequest, opts ...grpc.CallOption) (*ForexReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ForexReply)
|
|
err := c.cc.Invoke(ctx, Forex_ForexUpdatePlaceOrder_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *forexClient) ForexPosition(ctx context.Context, in *CancelForexRequest, opts ...grpc.CallOption) (*ForexReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ForexReply)
|
|
err := c.cc.Invoke(ctx, Forex_ForexPosition_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *forexClient) ForexAllPosition(ctx context.Context, in *AllForexRequest, opts ...grpc.CallOption) (*AllForexReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(AllForexReply)
|
|
err := c.cc.Invoke(ctx, Forex_ForexAllPosition_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *forexClient) ForexCancel(ctx context.Context, in *CancelForexRequest, opts ...grpc.CallOption) (*ForexReply, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ForexReply)
|
|
err := c.cc.Invoke(ctx, Forex_ForexCancel_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// ForexServer is the server API for Forex service.
|
|
// All implementations must embed UnimplementedForexServer
|
|
// for forward compatibility
|
|
type ForexServer interface {
|
|
// GetBotForexTrade 外汇列表查询
|
|
GetBotForexTrade(context.Context, *GetBotForexTradeRequest) (*GetBotForexTradeReply, error)
|
|
// ForexPlaceOrder 外汇下单
|
|
ForexPlaceOrder(context.Context, *ForexRequest) (*ForexReply, error)
|
|
// ForexUpdatePlaceOrder 外汇设置止盈止损
|
|
ForexUpdatePlaceOrder(context.Context, *UpdateForexRequest) (*ForexReply, error)
|
|
// ForexPosition 外汇平仓
|
|
ForexPosition(context.Context, *CancelForexRequest) (*ForexReply, error)
|
|
// ForexAllPosition 外汇一键平仓
|
|
ForexAllPosition(context.Context, *AllForexRequest) (*AllForexReply, error)
|
|
// ForexCancel 外汇撤单
|
|
ForexCancel(context.Context, *CancelForexRequest) (*ForexReply, error)
|
|
mustEmbedUnimplementedForexServer()
|
|
}
|
|
|
|
// UnimplementedForexServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedForexServer struct {
|
|
}
|
|
|
|
func (UnimplementedForexServer) GetBotForexTrade(context.Context, *GetBotForexTradeRequest) (*GetBotForexTradeReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetBotForexTrade not implemented")
|
|
}
|
|
func (UnimplementedForexServer) ForexPlaceOrder(context.Context, *ForexRequest) (*ForexReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ForexPlaceOrder not implemented")
|
|
}
|
|
func (UnimplementedForexServer) ForexUpdatePlaceOrder(context.Context, *UpdateForexRequest) (*ForexReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ForexUpdatePlaceOrder not implemented")
|
|
}
|
|
func (UnimplementedForexServer) ForexPosition(context.Context, *CancelForexRequest) (*ForexReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ForexPosition not implemented")
|
|
}
|
|
func (UnimplementedForexServer) ForexAllPosition(context.Context, *AllForexRequest) (*AllForexReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ForexAllPosition not implemented")
|
|
}
|
|
func (UnimplementedForexServer) ForexCancel(context.Context, *CancelForexRequest) (*ForexReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ForexCancel not implemented")
|
|
}
|
|
func (UnimplementedForexServer) mustEmbedUnimplementedForexServer() {}
|
|
|
|
// UnsafeForexServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to ForexServer will
|
|
// result in compilation errors.
|
|
type UnsafeForexServer interface {
|
|
mustEmbedUnimplementedForexServer()
|
|
}
|
|
|
|
func RegisterForexServer(s grpc.ServiceRegistrar, srv ForexServer) {
|
|
s.RegisterService(&Forex_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Forex_GetBotForexTrade_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetBotForexTradeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ForexServer).GetBotForexTrade(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Forex_GetBotForexTrade_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ForexServer).GetBotForexTrade(ctx, req.(*GetBotForexTradeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Forex_ForexPlaceOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ForexRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ForexServer).ForexPlaceOrder(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Forex_ForexPlaceOrder_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ForexServer).ForexPlaceOrder(ctx, req.(*ForexRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Forex_ForexUpdatePlaceOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateForexRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ForexServer).ForexUpdatePlaceOrder(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Forex_ForexUpdatePlaceOrder_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ForexServer).ForexUpdatePlaceOrder(ctx, req.(*UpdateForexRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Forex_ForexPosition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CancelForexRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ForexServer).ForexPosition(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Forex_ForexPosition_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ForexServer).ForexPosition(ctx, req.(*CancelForexRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Forex_ForexAllPosition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(AllForexRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ForexServer).ForexAllPosition(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Forex_ForexAllPosition_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ForexServer).ForexAllPosition(ctx, req.(*AllForexRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Forex_ForexCancel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CancelForexRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ForexServer).ForexCancel(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Forex_ForexCancel_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ForexServer).ForexCancel(ctx, req.(*CancelForexRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// Forex_ServiceDesc is the grpc.ServiceDesc for Forex service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var Forex_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "matchmaking.v1.Forex",
|
|
HandlerType: (*ForexServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "GetBotForexTrade",
|
|
Handler: _Forex_GetBotForexTrade_Handler,
|
|
},
|
|
{
|
|
MethodName: "ForexPlaceOrder",
|
|
Handler: _Forex_ForexPlaceOrder_Handler,
|
|
},
|
|
{
|
|
MethodName: "ForexUpdatePlaceOrder",
|
|
Handler: _Forex_ForexUpdatePlaceOrder_Handler,
|
|
},
|
|
{
|
|
MethodName: "ForexPosition",
|
|
Handler: _Forex_ForexPosition_Handler,
|
|
},
|
|
{
|
|
MethodName: "ForexAllPosition",
|
|
Handler: _Forex_ForexAllPosition_Handler,
|
|
},
|
|
{
|
|
MethodName: "ForexCancel",
|
|
Handler: _Forex_ForexCancel_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "matchmaking/v1/forex/forex.proto",
|
|
}
|
|
|