// Code generated by protoc-gen-micro. DO NOT EDIT. // source: trade.proto package proto import ( fmt "fmt" proto "google.golang.org/protobuf/proto" math "math" ) import ( context "context" api "go-micro.dev/v4/api" client "go-micro.dev/v4/client" server "go-micro.dev/v4/server" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // Reference imports to suppress errors if they are not otherwise used. var _ api.Endpoint var _ context.Context var _ client.Option var _ server.Option // Api Endpoints for AddTradeOrder service func NewAddTradeOrderEndpoints() []*api.Endpoint { return []*api.Endpoint{} } // Client API for AddTradeOrder service type AddTradeOrderService interface { // rpc 服务 AddTradeOrder(ctx context.Context, in *AddTradeOrderReq, opts ...client.CallOption) (*AddTradeOrderResp, error) } type addTradeOrderService struct { c client.Client name string } func NewAddTradeOrderService(name string, c client.Client) AddTradeOrderService { return &addTradeOrderService{ c: c, name: name, } } func (c *addTradeOrderService) AddTradeOrder(ctx context.Context, in *AddTradeOrderReq, opts ...client.CallOption) (*AddTradeOrderResp, error) { req := c.c.NewRequest(c.name, "AddTradeOrder.AddTradeOrder", in) out := new(AddTradeOrderResp) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } // Server API for AddTradeOrder service type AddTradeOrderHandler interface { // rpc 服务 AddTradeOrder(context.Context, *AddTradeOrderReq, *AddTradeOrderResp) error } func RegisterAddTradeOrderHandler(s server.Server, hdlr AddTradeOrderHandler, opts ...server.HandlerOption) error { type addTradeOrder interface { AddTradeOrder(ctx context.Context, in *AddTradeOrderReq, out *AddTradeOrderResp) error } type AddTradeOrder struct { addTradeOrder } h := &addTradeOrderHandler{hdlr} return s.Handle(s.NewHandler(&AddTradeOrder{h}, opts...)) } type addTradeOrderHandler struct { AddTradeOrderHandler } func (h *addTradeOrderHandler) AddTradeOrder(ctx context.Context, in *AddTradeOrderReq, out *AddTradeOrderResp) error { return h.AddTradeOrderHandler.AddTradeOrder(ctx, in, out) } // Api Endpoints for UpdateTradeOrder service func NewUpdateTradeOrderEndpoints() []*api.Endpoint { return []*api.Endpoint{} } // Client API for UpdateTradeOrder service type UpdateTradeOrderService interface { // rpc 服务 UpdateTradeOrder(ctx context.Context, in *AddTradeOrderReq, opts ...client.CallOption) (*AddTradeOrderResp, error) } type updateTradeOrderService struct { c client.Client name string } func NewUpdateTradeOrderService(name string, c client.Client) UpdateTradeOrderService { return &updateTradeOrderService{ c: c, name: name, } } func (c *updateTradeOrderService) UpdateTradeOrder(ctx context.Context, in *AddTradeOrderReq, opts ...client.CallOption) (*AddTradeOrderResp, error) { req := c.c.NewRequest(c.name, "UpdateTradeOrder.UpdateTradeOrder", in) out := new(AddTradeOrderResp) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } // Server API for UpdateTradeOrder service type UpdateTradeOrderHandler interface { // rpc 服务 UpdateTradeOrder(context.Context, *AddTradeOrderReq, *AddTradeOrderResp) error } func RegisterUpdateTradeOrderHandler(s server.Server, hdlr UpdateTradeOrderHandler, opts ...server.HandlerOption) error { type updateTradeOrder interface { UpdateTradeOrder(ctx context.Context, in *AddTradeOrderReq, out *AddTradeOrderResp) error } type UpdateTradeOrder struct { updateTradeOrder } h := &updateTradeOrderHandler{hdlr} return s.Handle(s.NewHandler(&UpdateTradeOrder{h}, opts...)) } type updateTradeOrderHandler struct { UpdateTradeOrderHandler } func (h *updateTradeOrderHandler) UpdateTradeOrder(ctx context.Context, in *AddTradeOrderReq, out *AddTradeOrderResp) error { return h.UpdateTradeOrderHandler.UpdateTradeOrder(ctx, in, out) } // Api Endpoints for UpdateCart service func NewUpdateCartEndpoints() []*api.Endpoint { return []*api.Endpoint{} } // Client API for UpdateCart service type UpdateCartService interface { // rpc 服务 UpdateCart(ctx context.Context, in *UpdateCartReq, opts ...client.CallOption) (*UpdateCartResp, error) } type updateCartService struct { c client.Client name string } func NewUpdateCartService(name string, c client.Client) UpdateCartService { return &updateCartService{ c: c, name: name, } } func (c *updateCartService) UpdateCart(ctx context.Context, in *UpdateCartReq, opts ...client.CallOption) (*UpdateCartResp, error) { req := c.c.NewRequest(c.name, "UpdateCart.UpdateCart", in) out := new(UpdateCartResp) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } // Server API for UpdateCart service type UpdateCartHandler interface { // rpc 服务 UpdateCart(context.Context, *UpdateCartReq, *UpdateCartResp) error } func RegisterUpdateCartHandler(s server.Server, hdlr UpdateCartHandler, opts ...server.HandlerOption) error { type updateCart interface { UpdateCart(ctx context.Context, in *UpdateCartReq, out *UpdateCartResp) error } type UpdateCart struct { updateCart } h := &updateCartHandler{hdlr} return s.Handle(s.NewHandler(&UpdateCart{h}, opts...)) } type updateCartHandler struct { UpdateCartHandler } func (h *updateCartHandler) UpdateCart(ctx context.Context, in *UpdateCartReq, out *UpdateCartResp) error { return h.UpdateCartHandler.UpdateCart(ctx, in, out) } // Api Endpoints for FindCart service func NewFindCartEndpoints() []*api.Endpoint { return []*api.Endpoint{} } // Client API for FindCart service type FindCartService interface { FindCart(ctx context.Context, in *FindCartReq, opts ...client.CallOption) (*FindCartResp, error) } type findCartService struct { c client.Client name string } func NewFindCartService(name string, c client.Client) FindCartService { return &findCartService{ c: c, name: name, } } func (c *findCartService) FindCart(ctx context.Context, in *FindCartReq, opts ...client.CallOption) (*FindCartResp, error) { req := c.c.NewRequest(c.name, "FindCart.FindCart", in) out := new(FindCartResp) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } // Server API for FindCart service type FindCartHandler interface { FindCart(context.Context, *FindCartReq, *FindCartResp) error } func RegisterFindCartHandler(s server.Server, hdlr FindCartHandler, opts ...server.HandlerOption) error { type findCart interface { FindCart(ctx context.Context, in *FindCartReq, out *FindCartResp) error } type FindCart struct { findCart } h := &findCartHandler{hdlr} return s.Handle(s.NewHandler(&FindCart{h}, opts...)) } type findCartHandler struct { FindCartHandler } func (h *findCartHandler) FindCart(ctx context.Context, in *FindCartReq, out *FindCartResp) error { return h.FindCartHandler.FindCart(ctx, in, out) } // Api Endpoints for Page service func NewPageEndpoints() []*api.Endpoint { return []*api.Endpoint{} } // Client API for Page service type PageService interface { // rpc 服务 Page(ctx context.Context, in *PageReq, opts ...client.CallOption) (*PageResp, error) } type pageService struct { c client.Client name string } func NewPageService(name string, c client.Client) PageService { return &pageService{ c: c, name: name, } } func (c *pageService) Page(ctx context.Context, in *PageReq, opts ...client.CallOption) (*PageResp, error) { req := c.c.NewRequest(c.name, "Page.Page", in) out := new(PageResp) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } // Server API for Page service type PageHandler interface { // rpc 服务 Page(context.Context, *PageReq, *PageResp) error } func RegisterPageHandler(s server.Server, hdlr PageHandler, opts ...server.HandlerOption) error { type page interface { Page(ctx context.Context, in *PageReq, out *PageResp) error } type Page struct { page } h := &pageHandler{hdlr} return s.Handle(s.NewHandler(&Page{h}, opts...)) } type pageHandler struct { PageHandler } func (h *pageHandler) Page(ctx context.Context, in *PageReq, out *PageResp) error { return h.PageHandler.Page(ctx, in, out) } // Api Endpoints for ShowProductDetail service func NewShowProductDetailEndpoints() []*api.Endpoint { return []*api.Endpoint{} } // Client API for ShowProductDetail service type ShowProductDetailService interface { // rpc 服务 ShowProductDetail(ctx context.Context, in *ProductDetailReq, opts ...client.CallOption) (*ProductDetailResp, error) } type showProductDetailService struct { c client.Client name string } func NewShowProductDetailService(name string, c client.Client) ShowProductDetailService { return &showProductDetailService{ c: c, name: name, } } func (c *showProductDetailService) ShowProductDetail(ctx context.Context, in *ProductDetailReq, opts ...client.CallOption) (*ProductDetailResp, error) { req := c.c.NewRequest(c.name, "ShowProductDetail.ShowProductDetail", in) out := new(ProductDetailResp) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } // Server API for ShowProductDetail service type ShowProductDetailHandler interface { // rpc 服务 ShowProductDetail(context.Context, *ProductDetailReq, *ProductDetailResp) error } func RegisterShowProductDetailHandler(s server.Server, hdlr ShowProductDetailHandler, opts ...server.HandlerOption) error { type showProductDetail interface { ShowProductDetail(ctx context.Context, in *ProductDetailReq, out *ProductDetailResp) error } type ShowProductDetail struct { showProductDetail } h := &showProductDetailHandler{hdlr} return s.Handle(s.NewHandler(&ShowProductDetail{h}, opts...)) } type showProductDetailHandler struct { ShowProductDetailHandler } func (h *showProductDetailHandler) ShowProductDetail(ctx context.Context, in *ProductDetailReq, out *ProductDetailResp) error { return h.ShowProductDetailHandler.ShowProductDetail(ctx, in, out) } // Api Endpoints for ShowProductSku service func NewShowProductSkuEndpoints() []*api.Endpoint { return []*api.Endpoint{} } // Client API for ShowProductSku service type ShowProductSkuService interface { // rpc 服务 ShowProductSku(ctx context.Context, in *ProductSkuReq, opts ...client.CallOption) (*ProductSkuResp, error) } type showProductSkuService struct { c client.Client name string } func NewShowProductSkuService(name string, c client.Client) ShowProductSkuService { return &showProductSkuService{ c: c, name: name, } } func (c *showProductSkuService) ShowProductSku(ctx context.Context, in *ProductSkuReq, opts ...client.CallOption) (*ProductSkuResp, error) { req := c.c.NewRequest(c.name, "ShowProductSku.ShowProductSku", in) out := new(ProductSkuResp) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } // Server API for ShowProductSku service type ShowProductSkuHandler interface { // rpc 服务 ShowProductSku(context.Context, *ProductSkuReq, *ProductSkuResp) error } func RegisterShowProductSkuHandler(s server.Server, hdlr ShowProductSkuHandler, opts ...server.HandlerOption) error { type showProductSku interface { ShowProductSku(ctx context.Context, in *ProductSkuReq, out *ProductSkuResp) error } type ShowProductSku struct { showProductSku } h := &showProductSkuHandler{hdlr} return s.Handle(s.NewHandler(&ShowProductSku{h}, opts...)) } type showProductSkuHandler struct { ShowProductSkuHandler } func (h *showProductSkuHandler) ShowProductSku(ctx context.Context, in *ProductSkuReq, out *ProductSkuResp) error { return h.ShowProductSkuHandler.ShowProductSku(ctx, in, out) } // Api Endpoints for ShowDetailSku service func NewShowDetailSkuEndpoints() []*api.Endpoint { return []*api.Endpoint{} } // Client API for ShowDetailSku service type ShowDetailSkuService interface { // rpc 服务 ShowDetailSku(ctx context.Context, in *ProductDetailReq, opts ...client.CallOption) (*ProductSkuResp, error) } type showDetailSkuService struct { c client.Client name string } func NewShowDetailSkuService(name string, c client.Client) ShowDetailSkuService { return &showDetailSkuService{ c: c, name: name, } } func (c *showDetailSkuService) ShowDetailSku(ctx context.Context, in *ProductDetailReq, opts ...client.CallOption) (*ProductSkuResp, error) { req := c.c.NewRequest(c.name, "ShowDetailSku.ShowDetailSku", in) out := new(ProductSkuResp) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } // Server API for ShowDetailSku service type ShowDetailSkuHandler interface { // rpc 服务 ShowDetailSku(context.Context, *ProductDetailReq, *ProductSkuResp) error } func RegisterShowDetailSkuHandler(s server.Server, hdlr ShowDetailSkuHandler, opts ...server.HandlerOption) error { type showDetailSku interface { ShowDetailSku(ctx context.Context, in *ProductDetailReq, out *ProductSkuResp) error } type ShowDetailSku struct { showDetailSku } h := &showDetailSkuHandler{hdlr} return s.Handle(s.NewHandler(&ShowDetailSku{h}, opts...)) } type showDetailSkuHandler struct { ShowDetailSkuHandler } func (h *showDetailSkuHandler) ShowDetailSku(ctx context.Context, in *ProductDetailReq, out *ProductSkuResp) error { return h.ShowDetailSkuHandler.ShowDetailSku(ctx, in, out) } // Api Endpoints for GetUserToken service func NewGetUserTokenEndpoints() []*api.Endpoint { return []*api.Endpoint{} } // Client API for GetUserToken service type GetUserTokenService interface { // rpc 服务 GetUserToken(ctx context.Context, in *TokenReq, opts ...client.CallOption) (*TokenResp, error) } type getUserTokenService struct { c client.Client name string } func NewGetUserTokenService(name string, c client.Client) GetUserTokenService { return &getUserTokenService{ c: c, name: name, } } func (c *getUserTokenService) GetUserToken(ctx context.Context, in *TokenReq, opts ...client.CallOption) (*TokenResp, error) { req := c.c.NewRequest(c.name, "GetUserToken.GetUserToken", in) out := new(TokenResp) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } // Server API for GetUserToken service type GetUserTokenHandler interface { // rpc 服务 GetUserToken(context.Context, *TokenReq, *TokenResp) error } func RegisterGetUserTokenHandler(s server.Server, hdlr GetUserTokenHandler, opts ...server.HandlerOption) error { type getUserToken interface { GetUserToken(ctx context.Context, in *TokenReq, out *TokenResp) error } type GetUserToken struct { getUserToken } h := &getUserTokenHandler{hdlr} return s.Handle(s.NewHandler(&GetUserToken{h}, opts...)) } type getUserTokenHandler struct { GetUserTokenHandler } func (h *getUserTokenHandler) GetUserToken(ctx context.Context, in *TokenReq, out *TokenResp) error { return h.GetUserTokenHandler.GetUserToken(ctx, in, out) } // Api Endpoints for UpdateSku service func NewUpdateSkuEndpoints() []*api.Endpoint { return []*api.Endpoint{} } // Client API for UpdateSku service type UpdateSkuService interface { UpdateSku(ctx context.Context, in *UpdateSkuReq, opts ...client.CallOption) (*UpdateSkuResp, error) } type updateSkuService struct { c client.Client name string } func NewUpdateSkuService(name string, c client.Client) UpdateSkuService { return &updateSkuService{ c: c, name: name, } } func (c *updateSkuService) UpdateSku(ctx context.Context, in *UpdateSkuReq, opts ...client.CallOption) (*UpdateSkuResp, error) { req := c.c.NewRequest(c.name, "UpdateSku.UpdateSku", in) out := new(UpdateSkuResp) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } // Server API for UpdateSku service type UpdateSkuHandler interface { UpdateSku(context.Context, *UpdateSkuReq, *UpdateSkuResp) error } func RegisterUpdateSkuHandler(s server.Server, hdlr UpdateSkuHandler, opts ...server.HandlerOption) error { type updateSku interface { UpdateSku(ctx context.Context, in *UpdateSkuReq, out *UpdateSkuResp) error } type UpdateSku struct { updateSku } h := &updateSkuHandler{hdlr} return s.Handle(s.NewHandler(&UpdateSku{h}, opts...)) } type updateSkuHandler struct { UpdateSkuHandler } func (h *updateSkuHandler) UpdateSku(ctx context.Context, in *UpdateSkuReq, out *UpdateSkuResp) error { return h.UpdateSkuHandler.UpdateSku(ctx, in, out) } // Api Endpoints for GetOrderTotal service func NewGetOrderTotalEndpoints() []*api.Endpoint { return []*api.Endpoint{} } // Client API for GetOrderTotal service type GetOrderTotalService interface { // rpc 服务 GetOrderTotal(ctx context.Context, in *OrderTotalReq, opts ...client.CallOption) (*OrderTotalResp, error) } type getOrderTotalService struct { c client.Client name string } func NewGetOrderTotalService(name string, c client.Client) GetOrderTotalService { return &getOrderTotalService{ c: c, name: name, } } func (c *getOrderTotalService) GetOrderTotal(ctx context.Context, in *OrderTotalReq, opts ...client.CallOption) (*OrderTotalResp, error) { req := c.c.NewRequest(c.name, "GetOrderTotal.GetOrderTotal", in) out := new(OrderTotalResp) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } // Server API for GetOrderTotal service type GetOrderTotalHandler interface { // rpc 服务 GetOrderTotal(context.Context, *OrderTotalReq, *OrderTotalResp) error } func RegisterGetOrderTotalHandler(s server.Server, hdlr GetOrderTotalHandler, opts ...server.HandlerOption) error { type getOrderTotal interface { GetOrderTotal(ctx context.Context, in *OrderTotalReq, out *OrderTotalResp) error } type GetOrderTotal struct { getOrderTotal } h := &getOrderTotalHandler{hdlr} return s.Handle(s.NewHandler(&GetOrderTotal{h}, opts...)) } type getOrderTotalHandler struct { GetOrderTotalHandler } func (h *getOrderTotalHandler) GetOrderTotal(ctx context.Context, in *OrderTotalReq, out *OrderTotalResp) error { return h.GetOrderTotalHandler.GetOrderTotal(ctx, in, out) } // Api Endpoints for FindOrder service func NewFindOrderEndpoints() []*api.Endpoint { return []*api.Endpoint{} } // Client API for FindOrder service type FindOrderService interface { FindOrder(ctx context.Context, in *FindOrderReq, opts ...client.CallOption) (*FindOrderResp, error) } type findOrderService struct { c client.Client name string } func NewFindOrderService(name string, c client.Client) FindOrderService { return &findOrderService{ c: c, name: name, } } func (c *findOrderService) FindOrder(ctx context.Context, in *FindOrderReq, opts ...client.CallOption) (*FindOrderResp, error) { req := c.c.NewRequest(c.name, "FindOrder.FindOrder", in) out := new(FindOrderResp) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } // Server API for FindOrder service type FindOrderHandler interface { FindOrder(context.Context, *FindOrderReq, *FindOrderResp) error } func RegisterFindOrderHandler(s server.Server, hdlr FindOrderHandler, opts ...server.HandlerOption) error { type findOrder interface { FindOrder(ctx context.Context, in *FindOrderReq, out *FindOrderResp) error } type FindOrder struct { findOrder } h := &findOrderHandler{hdlr} return s.Handle(s.NewHandler(&FindOrder{h}, opts...)) } type findOrderHandler struct { FindOrderHandler } func (h *findOrderHandler) FindOrder(ctx context.Context, in *FindOrderReq, out *FindOrderResp) error { return h.FindOrderHandler.FindOrder(ctx, in, out) }