Ai
1 Star 0 Fork 0

GoLang/microservice_study

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
cartapi.pb.micro.go 1.92 KB
Copy Edit Raw Blame History
GoLang authored 2022-11-18 16:16 +08:00 . cartApi up
// Code generated by protoc-gen-micro. DO NOT EDIT.
// source: proto/cartApi.proto
package cartApi
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 CartApi service
func NewCartApiEndpoints() []*api.Endpoint {
return []*api.Endpoint{}
}
// Client API for CartApi service
type CartApiService interface {
FindAll(ctx context.Context, in *Request, opts ...client.CallOption) (*Response, error)
}
type cartApiService struct {
c client.Client
name string
}
func NewCartApiService(name string, c client.Client) CartApiService {
return &cartApiService{
c: c,
name: name,
}
}
func (c *cartApiService) FindAll(ctx context.Context, in *Request, opts ...client.CallOption) (*Response, error) {
req := c.c.NewRequest(c.name, "CartApi.FindAll", in)
out := new(Response)
err := c.c.Call(ctx, req, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for CartApi service
type CartApiHandler interface {
FindAll(context.Context, *Request, *Response) error
}
func RegisterCartApiHandler(s server.Server, hdlr CartApiHandler, opts ...server.HandlerOption) error {
type cartApi interface {
FindAll(ctx context.Context, in *Request, out *Response) error
}
type CartApi struct {
cartApi
}
h := &cartApiHandler{hdlr}
return s.Handle(s.NewHandler(&CartApi{h}, opts...))
}
type cartApiHandler struct {
CartApiHandler
}
func (h *cartApiHandler) FindAll(ctx context.Context, in *Request, out *Response) error {
return h.CartApiHandler.FindAll(ctx, in, out)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/qwert/microservice_study.git
git@gitee.com:qwert/microservice_study.git
qwert
microservice_study
microservice_study
a16dd36d265e

Search