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.
149 lines
3.8 KiB
149 lines
3.8 KiB
2 years ago
|
// 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 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)
|
||
|
}
|
||
|
|
||
|
// 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)
|
||
|
}
|