// 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/option/optionInr.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 OperationOptionInrGetBotStockOptionInrTrade = "/matchmaking.v1.OptionInr/GetBotStockOptionInrTrade" const OperationOptionInrOptionInrAllPosition = "/matchmaking.v1.OptionInr/OptionInrAllPosition" const OperationOptionInrOptionInrCancel = "/matchmaking.v1.OptionInr/OptionInrCancel" const OperationOptionInrOptionInrPlaceOrder = "/matchmaking.v1.OptionInr/OptionInrPlaceOrder" const OperationOptionInrOptionInrPosition = "/matchmaking.v1.OptionInr/OptionInrPosition" const OperationOptionInrOptionInrUpdateOrder = "/matchmaking.v1.OptionInr/OptionInrUpdateOrder" type OptionInrHTTPServer interface { // GetBotStockOptionInrTrade GetBotStockOptionInrTrade 期权-印度股列表查询 GetBotStockOptionInrTrade(context.Context, *GetBotStockOptionInrTradeRequest) (*GetBotStockOptionInrTradeReply, error) // OptionInrAllPosition OptionInrAllPosition 期权-印度股一键平仓 OptionInrAllPosition(context.Context, *AllOptionInrOrderRequest) (*AllOptionInrOrderReply, error) // OptionInrCancel OptionInrCancel 期权-印度股撤单 OptionInrCancel(context.Context, *CancelOptionInrOrderRequest) (*OptionInrOrderReply, error) // OptionInrPlaceOrder OptionInrPlaceOrder 期权-印度股下单 OptionInrPlaceOrder(context.Context, *OptionInrOrderRequest) (*OptionInrOrderReply, error) // OptionInrPosition OptionInrPosition 期权-印度股平仓 OptionInrPosition(context.Context, *CancelOptionInrOrderRequest) (*OptionInrOrderReply, error) // OptionInrUpdateOrder OptionInrUpdateOrder 期权-印度股设置止盈止损 OptionInrUpdateOrder(context.Context, *UpdateOptionInrOrderRequest) (*OptionInrOrderReply, error) } func RegisterOptionInrHTTPServer(s *http.Server, srv OptionInrHTTPServer) { r := s.Route("/") r.POST("/order_optioninr/share_list", _OptionInr_GetBotStockOptionInrTrade0_HTTP_Handler(srv)) r.POST("/order_optioninr/share_place_order", _OptionInr_OptionInrPlaceOrder0_HTTP_Handler(srv)) r.POST("/order_optioninr/share_update_order", _OptionInr_OptionInrUpdateOrder0_HTTP_Handler(srv)) r.POST("/order_optioninr/share_cancel", _OptionInr_OptionInrCancel0_HTTP_Handler(srv)) r.POST("/order_optioninr/share_position", _OptionInr_OptionInrPosition0_HTTP_Handler(srv)) r.POST("/order_optioninr/share_all_position", _OptionInr_OptionInrAllPosition0_HTTP_Handler(srv)) } func _OptionInr_GetBotStockOptionInrTrade0_HTTP_Handler(srv OptionInrHTTPServer) func(ctx http.Context) error { return func(ctx http.Context) error { var in GetBotStockOptionInrTradeRequest if err := ctx.Bind(&in); err != nil { return err } if err := ctx.BindQuery(&in); err != nil { return err } http.SetOperation(ctx, OperationOptionInrGetBotStockOptionInrTrade) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.GetBotStockOptionInrTrade(ctx, req.(*GetBotStockOptionInrTradeRequest)) }) out, err := h(ctx, &in) if err != nil { return err } reply := out.(*GetBotStockOptionInrTradeReply) return ctx.Result(200, reply) } } func _OptionInr_OptionInrPlaceOrder0_HTTP_Handler(srv OptionInrHTTPServer) func(ctx http.Context) error { return func(ctx http.Context) error { var in OptionInrOrderRequest if err := ctx.Bind(&in); err != nil { return err } if err := ctx.BindQuery(&in); err != nil { return err } http.SetOperation(ctx, OperationOptionInrOptionInrPlaceOrder) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.OptionInrPlaceOrder(ctx, req.(*OptionInrOrderRequest)) }) out, err := h(ctx, &in) if err != nil { return err } reply := out.(*OptionInrOrderReply) return ctx.Result(200, reply) } } func _OptionInr_OptionInrUpdateOrder0_HTTP_Handler(srv OptionInrHTTPServer) func(ctx http.Context) error { return func(ctx http.Context) error { var in UpdateOptionInrOrderRequest if err := ctx.Bind(&in); err != nil { return err } if err := ctx.BindQuery(&in); err != nil { return err } http.SetOperation(ctx, OperationOptionInrOptionInrUpdateOrder) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.OptionInrUpdateOrder(ctx, req.(*UpdateOptionInrOrderRequest)) }) out, err := h(ctx, &in) if err != nil { return err } reply := out.(*OptionInrOrderReply) return ctx.Result(200, reply) } } func _OptionInr_OptionInrCancel0_HTTP_Handler(srv OptionInrHTTPServer) func(ctx http.Context) error { return func(ctx http.Context) error { var in CancelOptionInrOrderRequest if err := ctx.Bind(&in); err != nil { return err } if err := ctx.BindQuery(&in); err != nil { return err } http.SetOperation(ctx, OperationOptionInrOptionInrCancel) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.OptionInrCancel(ctx, req.(*CancelOptionInrOrderRequest)) }) out, err := h(ctx, &in) if err != nil { return err } reply := out.(*OptionInrOrderReply) return ctx.Result(200, reply) } } func _OptionInr_OptionInrPosition0_HTTP_Handler(srv OptionInrHTTPServer) func(ctx http.Context) error { return func(ctx http.Context) error { var in CancelOptionInrOrderRequest if err := ctx.Bind(&in); err != nil { return err } if err := ctx.BindQuery(&in); err != nil { return err } http.SetOperation(ctx, OperationOptionInrOptionInrPosition) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.OptionInrPosition(ctx, req.(*CancelOptionInrOrderRequest)) }) out, err := h(ctx, &in) if err != nil { return err } reply := out.(*OptionInrOrderReply) return ctx.Result(200, reply) } } func _OptionInr_OptionInrAllPosition0_HTTP_Handler(srv OptionInrHTTPServer) func(ctx http.Context) error { return func(ctx http.Context) error { var in AllOptionInrOrderRequest if err := ctx.Bind(&in); err != nil { return err } if err := ctx.BindQuery(&in); err != nil { return err } http.SetOperation(ctx, OperationOptionInrOptionInrAllPosition) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.OptionInrAllPosition(ctx, req.(*AllOptionInrOrderRequest)) }) out, err := h(ctx, &in) if err != nil { return err } reply := out.(*AllOptionInrOrderReply) return ctx.Result(200, reply) } } type OptionInrHTTPClient interface { GetBotStockOptionInrTrade(ctx context.Context, req *GetBotStockOptionInrTradeRequest, opts ...http.CallOption) (rsp *GetBotStockOptionInrTradeReply, err error) OptionInrAllPosition(ctx context.Context, req *AllOptionInrOrderRequest, opts ...http.CallOption) (rsp *AllOptionInrOrderReply, err error) OptionInrCancel(ctx context.Context, req *CancelOptionInrOrderRequest, opts ...http.CallOption) (rsp *OptionInrOrderReply, err error) OptionInrPlaceOrder(ctx context.Context, req *OptionInrOrderRequest, opts ...http.CallOption) (rsp *OptionInrOrderReply, err error) OptionInrPosition(ctx context.Context, req *CancelOptionInrOrderRequest, opts ...http.CallOption) (rsp *OptionInrOrderReply, err error) OptionInrUpdateOrder(ctx context.Context, req *UpdateOptionInrOrderRequest, opts ...http.CallOption) (rsp *OptionInrOrderReply, err error) } type OptionInrHTTPClientImpl struct { cc *http.Client } func NewOptionInrHTTPClient(client *http.Client) OptionInrHTTPClient { return &OptionInrHTTPClientImpl{client} } func (c *OptionInrHTTPClientImpl) GetBotStockOptionInrTrade(ctx context.Context, in *GetBotStockOptionInrTradeRequest, opts ...http.CallOption) (*GetBotStockOptionInrTradeReply, error) { var out GetBotStockOptionInrTradeReply pattern := "/order_optioninr/share_list" path := binding.EncodeURL(pattern, in, false) opts = append(opts, http.Operation(OperationOptionInrGetBotStockOptionInrTrade)) 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 *OptionInrHTTPClientImpl) OptionInrAllPosition(ctx context.Context, in *AllOptionInrOrderRequest, opts ...http.CallOption) (*AllOptionInrOrderReply, error) { var out AllOptionInrOrderReply pattern := "/order_optioninr/share_all_position" path := binding.EncodeURL(pattern, in, false) opts = append(opts, http.Operation(OperationOptionInrOptionInrAllPosition)) 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 *OptionInrHTTPClientImpl) OptionInrCancel(ctx context.Context, in *CancelOptionInrOrderRequest, opts ...http.CallOption) (*OptionInrOrderReply, error) { var out OptionInrOrderReply pattern := "/order_optioninr/share_cancel" path := binding.EncodeURL(pattern, in, false) opts = append(opts, http.Operation(OperationOptionInrOptionInrCancel)) 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 *OptionInrHTTPClientImpl) OptionInrPlaceOrder(ctx context.Context, in *OptionInrOrderRequest, opts ...http.CallOption) (*OptionInrOrderReply, error) { var out OptionInrOrderReply pattern := "/order_optioninr/share_place_order" path := binding.EncodeURL(pattern, in, false) opts = append(opts, http.Operation(OperationOptionInrOptionInrPlaceOrder)) 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 *OptionInrHTTPClientImpl) OptionInrPosition(ctx context.Context, in *CancelOptionInrOrderRequest, opts ...http.CallOption) (*OptionInrOrderReply, error) { var out OptionInrOrderReply pattern := "/order_optioninr/share_position" path := binding.EncodeURL(pattern, in, false) opts = append(opts, http.Operation(OperationOptionInrOptionInrPosition)) 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 *OptionInrHTTPClientImpl) OptionInrUpdateOrder(ctx context.Context, in *UpdateOptionInrOrderRequest, opts ...http.CallOption) (*OptionInrOrderReply, error) { var out OptionInrOrderReply pattern := "/order_optioninr/share_update_order" path := binding.EncodeURL(pattern, in, false) opts = append(opts, http.Operation(OperationOptionInrOptionInrUpdateOrder)) 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 }