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

// 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/shareInr.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 OperationShareInrGetBotStockInrTrade = "/matchmaking.v1.ShareInr/GetBotStockInrTrade"
const OperationShareInrShareInrAllPosition = "/matchmaking.v1.ShareInr/ShareInrAllPosition"
const OperationShareInrShareInrCancel = "/matchmaking.v1.ShareInr/ShareInrCancel"
const OperationShareInrShareInrPlaceOrder = "/matchmaking.v1.ShareInr/ShareInrPlaceOrder"
const OperationShareInrShareInrPosition = "/matchmaking.v1.ShareInr/ShareInrPosition"
const OperationShareInrShareInrUpdateOrder = "/matchmaking.v1.ShareInr/ShareInrUpdateOrder"
type ShareInrHTTPServer interface {
// GetBotStockInrTrade GetBotStockInrTrade 印度股列表查询
GetBotStockInrTrade(context.Context, *GetInrBotStockTradeRequest) (*GetBotStockInrTradeReply, error)
// ShareInrAllPosition ShareInrAllPosition 印度股一键平仓
ShareInrAllPosition(context.Context, *AllInrOrderRequest) (*AllInrOrderReply, error)
// ShareInrCancel ShareInrCancel 印度股撤单
ShareInrCancel(context.Context, *CancelInrOrderRequest) (*InrOrderReply, error)
// ShareInrPlaceOrder ShareInrPlaceOrder 印度股下单
ShareInrPlaceOrder(context.Context, *ShareInrOrderRequest) (*InrOrderReply, error)
// ShareInrPosition ShareInrPosition 印度股平仓
ShareInrPosition(context.Context, *CancelInrOrderRequest) (*InrOrderReply, error)
// ShareInrUpdateOrder ShareInrUpdateOrder 印度股设置止盈止损
ShareInrUpdateOrder(context.Context, *UpdateInrOrderRequest) (*InrOrderReply, error)
}
func RegisterShareInrHTTPServer(s *http.Server, srv ShareInrHTTPServer) {
r := s.Route("/")
r.POST("/order_shareinr/share_list", _ShareInr_GetBotStockInrTrade0_HTTP_Handler(srv))
r.POST("/order_shareinr/share_place_order", _ShareInr_ShareInrPlaceOrder0_HTTP_Handler(srv))
r.POST("/order_shareinr/share_update_order", _ShareInr_ShareInrUpdateOrder0_HTTP_Handler(srv))
r.POST("/order_shareinr/share_position", _ShareInr_ShareInrPosition0_HTTP_Handler(srv))
r.POST("/order_shareinr/share_all_position", _ShareInr_ShareInrAllPosition0_HTTP_Handler(srv))
r.POST("/order_shareinr/share_cancel", _ShareInr_ShareInrCancel0_HTTP_Handler(srv))
}
func _ShareInr_GetBotStockInrTrade0_HTTP_Handler(srv ShareInrHTTPServer) func(ctx http.Context) error {
return func(ctx http.Context) error {
var in GetInrBotStockTradeRequest
if err := ctx.Bind(&in); err != nil {
return err
}
if err := ctx.BindQuery(&in); err != nil {
return err
}
http.SetOperation(ctx, OperationShareInrGetBotStockInrTrade)
h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.GetBotStockInrTrade(ctx, req.(*GetInrBotStockTradeRequest))
})
out, err := h(ctx, &in)
if err != nil {
return err
}
reply := out.(*GetBotStockInrTradeReply)
return ctx.Result(200, reply)
}
}
func _ShareInr_ShareInrPlaceOrder0_HTTP_Handler(srv ShareInrHTTPServer) func(ctx http.Context) error {
return func(ctx http.Context) error {
var in ShareInrOrderRequest
if err := ctx.Bind(&in); err != nil {
return err
}
if err := ctx.BindQuery(&in); err != nil {
return err
}
http.SetOperation(ctx, OperationShareInrShareInrPlaceOrder)
h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.ShareInrPlaceOrder(ctx, req.(*ShareInrOrderRequest))
})
out, err := h(ctx, &in)
if err != nil {
return err
}
reply := out.(*InrOrderReply)
return ctx.Result(200, reply)
}
}
func _ShareInr_ShareInrUpdateOrder0_HTTP_Handler(srv ShareInrHTTPServer) func(ctx http.Context) error {
return func(ctx http.Context) error {
var in UpdateInrOrderRequest
if err := ctx.Bind(&in); err != nil {
return err
}
if err := ctx.BindQuery(&in); err != nil {
return err
}
http.SetOperation(ctx, OperationShareInrShareInrUpdateOrder)
h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.ShareInrUpdateOrder(ctx, req.(*UpdateInrOrderRequest))
})
out, err := h(ctx, &in)
if err != nil {
return err
}
reply := out.(*InrOrderReply)
return ctx.Result(200, reply)
}
}
func _ShareInr_ShareInrPosition0_HTTP_Handler(srv ShareInrHTTPServer) func(ctx http.Context) error {
return func(ctx http.Context) error {
var in CancelInrOrderRequest
if err := ctx.Bind(&in); err != nil {
return err
}
if err := ctx.BindQuery(&in); err != nil {
return err
}
http.SetOperation(ctx, OperationShareInrShareInrPosition)
h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.ShareInrPosition(ctx, req.(*CancelInrOrderRequest))
})
out, err := h(ctx, &in)
if err != nil {
return err
}
reply := out.(*InrOrderReply)
return ctx.Result(200, reply)
}
}
func _ShareInr_ShareInrAllPosition0_HTTP_Handler(srv ShareInrHTTPServer) func(ctx http.Context) error {
return func(ctx http.Context) error {
var in AllInrOrderRequest
if err := ctx.Bind(&in); err != nil {
return err
}
if err := ctx.BindQuery(&in); err != nil {
return err
}
http.SetOperation(ctx, OperationShareInrShareInrAllPosition)
h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.ShareInrAllPosition(ctx, req.(*AllInrOrderRequest))
})
out, err := h(ctx, &in)
if err != nil {
return err
}
reply := out.(*AllInrOrderReply)
return ctx.Result(200, reply)
}
}
func _ShareInr_ShareInrCancel0_HTTP_Handler(srv ShareInrHTTPServer) func(ctx http.Context) error {
return func(ctx http.Context) error {
var in CancelInrOrderRequest
if err := ctx.Bind(&in); err != nil {
return err
}
if err := ctx.BindQuery(&in); err != nil {
return err
}
http.SetOperation(ctx, OperationShareInrShareInrCancel)
h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.ShareInrCancel(ctx, req.(*CancelInrOrderRequest))
})
out, err := h(ctx, &in)
if err != nil {
return err
}
reply := out.(*InrOrderReply)
return ctx.Result(200, reply)
}
}
type ShareInrHTTPClient interface {
GetBotStockInrTrade(ctx context.Context, req *GetInrBotStockTradeRequest, opts ...http.CallOption) (rsp *GetBotStockInrTradeReply, err error)
ShareInrAllPosition(ctx context.Context, req *AllInrOrderRequest, opts ...http.CallOption) (rsp *AllInrOrderReply, err error)
ShareInrCancel(ctx context.Context, req *CancelInrOrderRequest, opts ...http.CallOption) (rsp *InrOrderReply, err error)
ShareInrPlaceOrder(ctx context.Context, req *ShareInrOrderRequest, opts ...http.CallOption) (rsp *InrOrderReply, err error)
ShareInrPosition(ctx context.Context, req *CancelInrOrderRequest, opts ...http.CallOption) (rsp *InrOrderReply, err error)
ShareInrUpdateOrder(ctx context.Context, req *UpdateInrOrderRequest, opts ...http.CallOption) (rsp *InrOrderReply, err error)
}
type ShareInrHTTPClientImpl struct {
cc *http.Client
}
func NewShareInrHTTPClient(client *http.Client) ShareInrHTTPClient {
return &ShareInrHTTPClientImpl{client}
}
func (c *ShareInrHTTPClientImpl) GetBotStockInrTrade(ctx context.Context, in *GetInrBotStockTradeRequest, opts ...http.CallOption) (*GetBotStockInrTradeReply, error) {
var out GetBotStockInrTradeReply
pattern := "/order_shareinr/share_list"
path := binding.EncodeURL(pattern, in, false)
opts = append(opts, http.Operation(OperationShareInrGetBotStockInrTrade))
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 *ShareInrHTTPClientImpl) ShareInrAllPosition(ctx context.Context, in *AllInrOrderRequest, opts ...http.CallOption) (*AllInrOrderReply, error) {
var out AllInrOrderReply
pattern := "/order_shareinr/share_all_position"
path := binding.EncodeURL(pattern, in, false)
opts = append(opts, http.Operation(OperationShareInrShareInrAllPosition))
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 *ShareInrHTTPClientImpl) ShareInrCancel(ctx context.Context, in *CancelInrOrderRequest, opts ...http.CallOption) (*InrOrderReply, error) {
var out InrOrderReply
pattern := "/order_shareinr/share_cancel"
path := binding.EncodeURL(pattern, in, false)
opts = append(opts, http.Operation(OperationShareInrShareInrCancel))
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 *ShareInrHTTPClientImpl) ShareInrPlaceOrder(ctx context.Context, in *ShareInrOrderRequest, opts ...http.CallOption) (*InrOrderReply, error) {
var out InrOrderReply
pattern := "/order_shareinr/share_place_order"
path := binding.EncodeURL(pattern, in, false)
opts = append(opts, http.Operation(OperationShareInrShareInrPlaceOrder))
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 *ShareInrHTTPClientImpl) ShareInrPosition(ctx context.Context, in *CancelInrOrderRequest, opts ...http.CallOption) (*InrOrderReply, error) {
var out InrOrderReply
pattern := "/order_shareinr/share_position"
path := binding.EncodeURL(pattern, in, false)
opts = append(opts, http.Operation(OperationShareInrShareInrPosition))
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 *ShareInrHTTPClientImpl) ShareInrUpdateOrder(ctx context.Context, in *UpdateInrOrderRequest, opts ...http.CallOption) (*InrOrderReply, error) {
var out InrOrderReply
pattern := "/order_shareinr/share_update_order"
path := binding.EncodeURL(pattern, in, false)
opts = append(opts, http.Operation(OperationShareInrShareInrUpdateOrder))
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
}