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.

635 lines
16 KiB

// Code generated by protoc-gen-micro. DO NOT EDIT.
// source: cart.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 AddCart service
func NewAddCartEndpoints() []*api.Endpoint {
return []*api.Endpoint{}
}
// Client API for AddCart service
type AddCartService interface {
// rpc 服务
AddCart(ctx context.Context, in *AddCartReq, opts ...client.CallOption) (*AddCartResp, error)
}
type addCartService struct {
c client.Client
name string
}
func NewAddCartService(name string, c client.Client) AddCartService {
return &addCartService{
c: c,
name: name,
}
}
func (c *addCartService) AddCart(ctx context.Context, in *AddCartReq, opts ...client.CallOption) (*AddCartResp, error) {
req := c.c.NewRequest(c.name, "AddCart.AddCart", in)
out := new(AddCartResp)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for AddCart service
type AddCartHandler interface {
// rpc 服务
AddCart(context.Context, *AddCartReq, *AddCartResp) error
}
func RegisterAddCartHandler(s server.Server, hdlr AddCartHandler, opts ...server.HandlerOption) error {
type addCart interface {
AddCart(ctx context.Context, in *AddCartReq, out *AddCartResp) error
}
type AddCart struct {
addCart
}
h := &addCartHandler{hdlr}
return s.Handle(s.NewHandler(&AddCart{h}, opts...))
}
type addCartHandler struct {
AddCartHandler
}
func (h *addCartHandler) AddCart(ctx context.Context, in *AddCartReq, out *AddCartResp) error {
return h.AddCartHandler.AddCart(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)
}