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.
279 lines
10 KiB
279 lines
10 KiB
// Code generated by protoc-gen-go-http. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-http v2.7.3
|
|
// - protoc v5.27.1
|
|
// source: matchmaking/v1/share/shareIdn.proto
|
|
|
|
package v1
|
|
|
|
import (
|
|
context "context"
|
|
http "github.com/go-kratos/kratos/v2/transport/http"
|
|
binding "github.com/go-kratos/kratos/v2/transport/http/binding"
|
|
)
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the kratos package it is being compiled against.
|
|
var _ = new(context.Context)
|
|
var _ = binding.EncodeURL
|
|
|
|
const _ = http.SupportPackageIsVersion1
|
|
|
|
const OperationShareIdnGetBotStockIdnTrade = "/matchmaking.v1.ShareIdn/GetBotStockIdnTrade"
|
|
const OperationShareIdnShareIdnAllPosition = "/matchmaking.v1.ShareIdn/ShareIdnAllPosition"
|
|
const OperationShareIdnShareIdnCancel = "/matchmaking.v1.ShareIdn/ShareIdnCancel"
|
|
const OperationShareIdnShareIdnPlaceOrder = "/matchmaking.v1.ShareIdn/ShareIdnPlaceOrder"
|
|
const OperationShareIdnShareIdnPosition = "/matchmaking.v1.ShareIdn/ShareIdnPosition"
|
|
const OperationShareIdnShareIdnUpdateOrder = "/matchmaking.v1.ShareIdn/ShareIdnUpdateOrder"
|
|
|
|
type ShareIdnHTTPServer interface {
|
|
// GetBotStockIdnTrade GetBotStockIdnTrade 印尼股列表查询
|
|
GetBotStockIdnTrade(context.Context, *GetIdnBotStockTradeRequest) (*GetBotStockIdnTradeReply, error)
|
|
// ShareIdnAllPosition ShareIdnAllPosition 印尼股一键平仓
|
|
ShareIdnAllPosition(context.Context, *AllIdnOrderRequest) (*AllIdnOrderReply, error)
|
|
// ShareIdnCancel ShareIdnCancel 印尼股撤单
|
|
ShareIdnCancel(context.Context, *CancelIdnOrderRequest) (*IdnOrderReply, error)
|
|
// ShareIdnPlaceOrder ShareIdnPlaceOrder 印尼股下单
|
|
ShareIdnPlaceOrder(context.Context, *ShareIdnOrderRequest) (*IdnOrderReply, error)
|
|
// ShareIdnPosition ShareIdnPosition 印尼股平仓
|
|
ShareIdnPosition(context.Context, *CancelIdnOrderRequest) (*IdnOrderReply, error)
|
|
// ShareIdnUpdateOrder ShareIdnUpdateOrder 印尼股设置止盈止损
|
|
ShareIdnUpdateOrder(context.Context, *UpdateIdnOrderRequest) (*IdnOrderReply, error)
|
|
}
|
|
|
|
func RegisterShareIdnHTTPServer(s *http.Server, srv ShareIdnHTTPServer) {
|
|
r := s.Route("/")
|
|
r.POST("/order_shareidn/share_list", _ShareIdn_GetBotStockIdnTrade0_HTTP_Handler(srv))
|
|
r.POST("/order_shareidn/share_place_order", _ShareIdn_ShareIdnPlaceOrder0_HTTP_Handler(srv))
|
|
r.POST("/order_shareidn/share_update_order", _ShareIdn_ShareIdnUpdateOrder0_HTTP_Handler(srv))
|
|
r.POST("/order_shareidn/share_position", _ShareIdn_ShareIdnPosition0_HTTP_Handler(srv))
|
|
r.POST("/order_shareidn/share_all_position", _ShareIdn_ShareIdnAllPosition0_HTTP_Handler(srv))
|
|
r.POST("/order_shareidn/share_cancel", _ShareIdn_ShareIdnCancel0_HTTP_Handler(srv))
|
|
}
|
|
|
|
func _ShareIdn_GetBotStockIdnTrade0_HTTP_Handler(srv ShareIdnHTTPServer) func(ctx http.Context) error {
|
|
return func(ctx http.Context) error {
|
|
var in GetIdnBotStockTradeRequest
|
|
if err := ctx.Bind(&in); err != nil {
|
|
return err
|
|
}
|
|
if err := ctx.BindQuery(&in); err != nil {
|
|
return err
|
|
}
|
|
http.SetOperation(ctx, OperationShareIdnGetBotStockIdnTrade)
|
|
h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.GetBotStockIdnTrade(ctx, req.(*GetIdnBotStockTradeRequest))
|
|
})
|
|
out, err := h(ctx, &in)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
reply := out.(*GetBotStockIdnTradeReply)
|
|
return ctx.Result(200, reply)
|
|
}
|
|
}
|
|
|
|
func _ShareIdn_ShareIdnPlaceOrder0_HTTP_Handler(srv ShareIdnHTTPServer) func(ctx http.Context) error {
|
|
return func(ctx http.Context) error {
|
|
var in ShareIdnOrderRequest
|
|
if err := ctx.Bind(&in); err != nil {
|
|
return err
|
|
}
|
|
if err := ctx.BindQuery(&in); err != nil {
|
|
return err
|
|
}
|
|
http.SetOperation(ctx, OperationShareIdnShareIdnPlaceOrder)
|
|
h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.ShareIdnPlaceOrder(ctx, req.(*ShareIdnOrderRequest))
|
|
})
|
|
out, err := h(ctx, &in)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
reply := out.(*IdnOrderReply)
|
|
return ctx.Result(200, reply)
|
|
}
|
|
}
|
|
|
|
func _ShareIdn_ShareIdnUpdateOrder0_HTTP_Handler(srv ShareIdnHTTPServer) func(ctx http.Context) error {
|
|
return func(ctx http.Context) error {
|
|
var in UpdateIdnOrderRequest
|
|
if err := ctx.Bind(&in); err != nil {
|
|
return err
|
|
}
|
|
if err := ctx.BindQuery(&in); err != nil {
|
|
return err
|
|
}
|
|
http.SetOperation(ctx, OperationShareIdnShareIdnUpdateOrder)
|
|
h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.ShareIdnUpdateOrder(ctx, req.(*UpdateIdnOrderRequest))
|
|
})
|
|
out, err := h(ctx, &in)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
reply := out.(*IdnOrderReply)
|
|
return ctx.Result(200, reply)
|
|
}
|
|
}
|
|
|
|
func _ShareIdn_ShareIdnPosition0_HTTP_Handler(srv ShareIdnHTTPServer) func(ctx http.Context) error {
|
|
return func(ctx http.Context) error {
|
|
var in CancelIdnOrderRequest
|
|
if err := ctx.Bind(&in); err != nil {
|
|
return err
|
|
}
|
|
if err := ctx.BindQuery(&in); err != nil {
|
|
return err
|
|
}
|
|
http.SetOperation(ctx, OperationShareIdnShareIdnPosition)
|
|
h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.ShareIdnPosition(ctx, req.(*CancelIdnOrderRequest))
|
|
})
|
|
out, err := h(ctx, &in)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
reply := out.(*IdnOrderReply)
|
|
return ctx.Result(200, reply)
|
|
}
|
|
}
|
|
|
|
func _ShareIdn_ShareIdnAllPosition0_HTTP_Handler(srv ShareIdnHTTPServer) func(ctx http.Context) error {
|
|
return func(ctx http.Context) error {
|
|
var in AllIdnOrderRequest
|
|
if err := ctx.Bind(&in); err != nil {
|
|
return err
|
|
}
|
|
if err := ctx.BindQuery(&in); err != nil {
|
|
return err
|
|
}
|
|
http.SetOperation(ctx, OperationShareIdnShareIdnAllPosition)
|
|
h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.ShareIdnAllPosition(ctx, req.(*AllIdnOrderRequest))
|
|
})
|
|
out, err := h(ctx, &in)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
reply := out.(*AllIdnOrderReply)
|
|
return ctx.Result(200, reply)
|
|
}
|
|
}
|
|
|
|
func _ShareIdn_ShareIdnCancel0_HTTP_Handler(srv ShareIdnHTTPServer) func(ctx http.Context) error {
|
|
return func(ctx http.Context) error {
|
|
var in CancelIdnOrderRequest
|
|
if err := ctx.Bind(&in); err != nil {
|
|
return err
|
|
}
|
|
if err := ctx.BindQuery(&in); err != nil {
|
|
return err
|
|
}
|
|
http.SetOperation(ctx, OperationShareIdnShareIdnCancel)
|
|
h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.ShareIdnCancel(ctx, req.(*CancelIdnOrderRequest))
|
|
})
|
|
out, err := h(ctx, &in)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
reply := out.(*IdnOrderReply)
|
|
return ctx.Result(200, reply)
|
|
}
|
|
}
|
|
|
|
type ShareIdnHTTPClient interface {
|
|
GetBotStockIdnTrade(ctx context.Context, req *GetIdnBotStockTradeRequest, opts ...http.CallOption) (rsp *GetBotStockIdnTradeReply, err error)
|
|
ShareIdnAllPosition(ctx context.Context, req *AllIdnOrderRequest, opts ...http.CallOption) (rsp *AllIdnOrderReply, err error)
|
|
ShareIdnCancel(ctx context.Context, req *CancelIdnOrderRequest, opts ...http.CallOption) (rsp *IdnOrderReply, err error)
|
|
ShareIdnPlaceOrder(ctx context.Context, req *ShareIdnOrderRequest, opts ...http.CallOption) (rsp *IdnOrderReply, err error)
|
|
ShareIdnPosition(ctx context.Context, req *CancelIdnOrderRequest, opts ...http.CallOption) (rsp *IdnOrderReply, err error)
|
|
ShareIdnUpdateOrder(ctx context.Context, req *UpdateIdnOrderRequest, opts ...http.CallOption) (rsp *IdnOrderReply, err error)
|
|
}
|
|
|
|
type ShareIdnHTTPClientImpl struct {
|
|
cc *http.Client
|
|
}
|
|
|
|
func NewShareIdnHTTPClient(client *http.Client) ShareIdnHTTPClient {
|
|
return &ShareIdnHTTPClientImpl{client}
|
|
}
|
|
|
|
func (c *ShareIdnHTTPClientImpl) GetBotStockIdnTrade(ctx context.Context, in *GetIdnBotStockTradeRequest, opts ...http.CallOption) (*GetBotStockIdnTradeReply, error) {
|
|
var out GetBotStockIdnTradeReply
|
|
pattern := "/order_shareidn/share_list"
|
|
path := binding.EncodeURL(pattern, in, false)
|
|
opts = append(opts, http.Operation(OperationShareIdnGetBotStockIdnTrade))
|
|
opts = append(opts, http.PathTemplate(pattern))
|
|
err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &out, nil
|
|
}
|
|
|
|
func (c *ShareIdnHTTPClientImpl) ShareIdnAllPosition(ctx context.Context, in *AllIdnOrderRequest, opts ...http.CallOption) (*AllIdnOrderReply, error) {
|
|
var out AllIdnOrderReply
|
|
pattern := "/order_shareidn/share_all_position"
|
|
path := binding.EncodeURL(pattern, in, false)
|
|
opts = append(opts, http.Operation(OperationShareIdnShareIdnAllPosition))
|
|
opts = append(opts, http.PathTemplate(pattern))
|
|
err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &out, nil
|
|
}
|
|
|
|
func (c *ShareIdnHTTPClientImpl) ShareIdnCancel(ctx context.Context, in *CancelIdnOrderRequest, opts ...http.CallOption) (*IdnOrderReply, error) {
|
|
var out IdnOrderReply
|
|
pattern := "/order_shareidn/share_cancel"
|
|
path := binding.EncodeURL(pattern, in, false)
|
|
opts = append(opts, http.Operation(OperationShareIdnShareIdnCancel))
|
|
opts = append(opts, http.PathTemplate(pattern))
|
|
err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &out, nil
|
|
}
|
|
|
|
func (c *ShareIdnHTTPClientImpl) ShareIdnPlaceOrder(ctx context.Context, in *ShareIdnOrderRequest, opts ...http.CallOption) (*IdnOrderReply, error) {
|
|
var out IdnOrderReply
|
|
pattern := "/order_shareidn/share_place_order"
|
|
path := binding.EncodeURL(pattern, in, false)
|
|
opts = append(opts, http.Operation(OperationShareIdnShareIdnPlaceOrder))
|
|
opts = append(opts, http.PathTemplate(pattern))
|
|
err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &out, nil
|
|
}
|
|
|
|
func (c *ShareIdnHTTPClientImpl) ShareIdnPosition(ctx context.Context, in *CancelIdnOrderRequest, opts ...http.CallOption) (*IdnOrderReply, error) {
|
|
var out IdnOrderReply
|
|
pattern := "/order_shareidn/share_position"
|
|
path := binding.EncodeURL(pattern, in, false)
|
|
opts = append(opts, http.Operation(OperationShareIdnShareIdnPosition))
|
|
opts = append(opts, http.PathTemplate(pattern))
|
|
err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &out, nil
|
|
}
|
|
|
|
func (c *ShareIdnHTTPClientImpl) ShareIdnUpdateOrder(ctx context.Context, in *UpdateIdnOrderRequest, opts ...http.CallOption) (*IdnOrderReply, error) {
|
|
var out IdnOrderReply
|
|
pattern := "/order_shareidn/share_update_order"
|
|
path := binding.EncodeURL(pattern, in, false)
|
|
opts = append(opts, http.Operation(OperationShareIdnShareIdnUpdateOrder))
|
|
opts = append(opts, http.PathTemplate(pattern))
|
|
err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &out, nil
|
|
}
|
|
|