// 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/shareMys.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 OperationShareMysGetBotStockMysTrade = "/matchmaking.v1.ShareMys/GetBotStockMysTrade" const OperationShareMysShareMysAllPosition = "/matchmaking.v1.ShareMys/ShareMysAllPosition" const OperationShareMysShareMysCancel = "/matchmaking.v1.ShareMys/ShareMysCancel" const OperationShareMysShareMysPlaceOrder = "/matchmaking.v1.ShareMys/ShareMysPlaceOrder" const OperationShareMysShareMysPosition = "/matchmaking.v1.ShareMys/ShareMysPosition" const OperationShareMysShareMysUpdateOrder = "/matchmaking.v1.ShareMys/ShareMysUpdateOrder" type ShareMysHTTPServer interface { // GetBotStockMysTrade GetBotStockMysTrade 马股列表查询 GetBotStockMysTrade(context.Context, *GetMysBotStockTradeRequest) (*GetBotStockMysTradeReply, error) // ShareMysAllPosition ShareMysAllPosition 马股一键平仓 ShareMysAllPosition(context.Context, *AllMysOrderRequest) (*AllMysOrderReply, error) // ShareMysCancel ShareMysCancel 马股撤单 ShareMysCancel(context.Context, *CancelMysOrderRequest) (*MysOrderReply, error) // ShareMysPlaceOrder ShareMysPlaceOrder 马股下单 ShareMysPlaceOrder(context.Context, *ShareMysOrderRequest) (*MysOrderReply, error) // ShareMysPosition ShareMysPosition 马股平仓 ShareMysPosition(context.Context, *CancelMysOrderRequest) (*MysOrderReply, error) // ShareMysUpdateOrder ShareMysUpdateOrder 马股设置止盈止损 ShareMysUpdateOrder(context.Context, *UpdateMysOrderRequest) (*MysOrderReply, error) } func RegisterShareMysHTTPServer(s *http.Server, srv ShareMysHTTPServer) { r := s.Route("/") r.POST("/order_sharemys/share_list", _ShareMys_GetBotStockMysTrade0_HTTP_Handler(srv)) r.POST("/order_sharemys/share_place_order", _ShareMys_ShareMysPlaceOrder0_HTTP_Handler(srv)) r.POST("/order_sharemys/share_update_order", _ShareMys_ShareMysUpdateOrder0_HTTP_Handler(srv)) r.POST("/order_sharemys/share_position", _ShareMys_ShareMysPosition0_HTTP_Handler(srv)) r.POST("/order_sharemys/share_all_position", _ShareMys_ShareMysAllPosition0_HTTP_Handler(srv)) r.POST("/order_sharemys/share_cancel", _ShareMys_ShareMysCancel0_HTTP_Handler(srv)) } func _ShareMys_GetBotStockMysTrade0_HTTP_Handler(srv ShareMysHTTPServer) func(ctx http.Context) error { return func(ctx http.Context) error { var in GetMysBotStockTradeRequest if err := ctx.Bind(&in); err != nil { return err } if err := ctx.BindQuery(&in); err != nil { return err } http.SetOperation(ctx, OperationShareMysGetBotStockMysTrade) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.GetBotStockMysTrade(ctx, req.(*GetMysBotStockTradeRequest)) }) out, err := h(ctx, &in) if err != nil { return err } reply := out.(*GetBotStockMysTradeReply) return ctx.Result(200, reply) } } func _ShareMys_ShareMysPlaceOrder0_HTTP_Handler(srv ShareMysHTTPServer) func(ctx http.Context) error { return func(ctx http.Context) error { var in ShareMysOrderRequest if err := ctx.Bind(&in); err != nil { return err } if err := ctx.BindQuery(&in); err != nil { return err } http.SetOperation(ctx, OperationShareMysShareMysPlaceOrder) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.ShareMysPlaceOrder(ctx, req.(*ShareMysOrderRequest)) }) out, err := h(ctx, &in) if err != nil { return err } reply := out.(*MysOrderReply) return ctx.Result(200, reply) } } func _ShareMys_ShareMysUpdateOrder0_HTTP_Handler(srv ShareMysHTTPServer) func(ctx http.Context) error { return func(ctx http.Context) error { var in UpdateMysOrderRequest if err := ctx.Bind(&in); err != nil { return err } if err := ctx.BindQuery(&in); err != nil { return err } http.SetOperation(ctx, OperationShareMysShareMysUpdateOrder) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.ShareMysUpdateOrder(ctx, req.(*UpdateMysOrderRequest)) }) out, err := h(ctx, &in) if err != nil { return err } reply := out.(*MysOrderReply) return ctx.Result(200, reply) } } func _ShareMys_ShareMysPosition0_HTTP_Handler(srv ShareMysHTTPServer) func(ctx http.Context) error { return func(ctx http.Context) error { var in CancelMysOrderRequest if err := ctx.Bind(&in); err != nil { return err } if err := ctx.BindQuery(&in); err != nil { return err } http.SetOperation(ctx, OperationShareMysShareMysPosition) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.ShareMysPosition(ctx, req.(*CancelMysOrderRequest)) }) out, err := h(ctx, &in) if err != nil { return err } reply := out.(*MysOrderReply) return ctx.Result(200, reply) } } func _ShareMys_ShareMysAllPosition0_HTTP_Handler(srv ShareMysHTTPServer) func(ctx http.Context) error { return func(ctx http.Context) error { var in AllMysOrderRequest if err := ctx.Bind(&in); err != nil { return err } if err := ctx.BindQuery(&in); err != nil { return err } http.SetOperation(ctx, OperationShareMysShareMysAllPosition) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.ShareMysAllPosition(ctx, req.(*AllMysOrderRequest)) }) out, err := h(ctx, &in) if err != nil { return err } reply := out.(*AllMysOrderReply) return ctx.Result(200, reply) } } func _ShareMys_ShareMysCancel0_HTTP_Handler(srv ShareMysHTTPServer) func(ctx http.Context) error { return func(ctx http.Context) error { var in CancelMysOrderRequest if err := ctx.Bind(&in); err != nil { return err } if err := ctx.BindQuery(&in); err != nil { return err } http.SetOperation(ctx, OperationShareMysShareMysCancel) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.ShareMysCancel(ctx, req.(*CancelMysOrderRequest)) }) out, err := h(ctx, &in) if err != nil { return err } reply := out.(*MysOrderReply) return ctx.Result(200, reply) } } type ShareMysHTTPClient interface { GetBotStockMysTrade(ctx context.Context, req *GetMysBotStockTradeRequest, opts ...http.CallOption) (rsp *GetBotStockMysTradeReply, err error) ShareMysAllPosition(ctx context.Context, req *AllMysOrderRequest, opts ...http.CallOption) (rsp *AllMysOrderReply, err error) ShareMysCancel(ctx context.Context, req *CancelMysOrderRequest, opts ...http.CallOption) (rsp *MysOrderReply, err error) ShareMysPlaceOrder(ctx context.Context, req *ShareMysOrderRequest, opts ...http.CallOption) (rsp *MysOrderReply, err error) ShareMysPosition(ctx context.Context, req *CancelMysOrderRequest, opts ...http.CallOption) (rsp *MysOrderReply, err error) ShareMysUpdateOrder(ctx context.Context, req *UpdateMysOrderRequest, opts ...http.CallOption) (rsp *MysOrderReply, err error) } type ShareMysHTTPClientImpl struct { cc *http.Client } func NewShareMysHTTPClient(client *http.Client) ShareMysHTTPClient { return &ShareMysHTTPClientImpl{client} } func (c *ShareMysHTTPClientImpl) GetBotStockMysTrade(ctx context.Context, in *GetMysBotStockTradeRequest, opts ...http.CallOption) (*GetBotStockMysTradeReply, error) { var out GetBotStockMysTradeReply pattern := "/order_sharemys/share_list" path := binding.EncodeURL(pattern, in, false) opts = append(opts, http.Operation(OperationShareMysGetBotStockMysTrade)) 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 *ShareMysHTTPClientImpl) ShareMysAllPosition(ctx context.Context, in *AllMysOrderRequest, opts ...http.CallOption) (*AllMysOrderReply, error) { var out AllMysOrderReply pattern := "/order_sharemys/share_all_position" path := binding.EncodeURL(pattern, in, false) opts = append(opts, http.Operation(OperationShareMysShareMysAllPosition)) 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 *ShareMysHTTPClientImpl) ShareMysCancel(ctx context.Context, in *CancelMysOrderRequest, opts ...http.CallOption) (*MysOrderReply, error) { var out MysOrderReply pattern := "/order_sharemys/share_cancel" path := binding.EncodeURL(pattern, in, false) opts = append(opts, http.Operation(OperationShareMysShareMysCancel)) 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 *ShareMysHTTPClientImpl) ShareMysPlaceOrder(ctx context.Context, in *ShareMysOrderRequest, opts ...http.CallOption) (*MysOrderReply, error) { var out MysOrderReply pattern := "/order_sharemys/share_place_order" path := binding.EncodeURL(pattern, in, false) opts = append(opts, http.Operation(OperationShareMysShareMysPlaceOrder)) 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 *ShareMysHTTPClientImpl) ShareMysPosition(ctx context.Context, in *CancelMysOrderRequest, opts ...http.CallOption) (*MysOrderReply, error) { var out MysOrderReply pattern := "/order_sharemys/share_position" path := binding.EncodeURL(pattern, in, false) opts = append(opts, http.Operation(OperationShareMysShareMysPosition)) 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 *ShareMysHTTPClientImpl) ShareMysUpdateOrder(ctx context.Context, in *UpdateMysOrderRequest, opts ...http.CallOption) (*MysOrderReply, error) { var out MysOrderReply pattern := "/order_sharemys/share_update_order" path := binding.EncodeURL(pattern, in, false) opts = append(opts, http.Operation(OperationShareMysShareMysUpdateOrder)) 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 }