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.
334 lines
8.3 KiB
334 lines
8.3 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 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)
|
|
}
|