Documentation ¶
Overview ¶
Code generated by protoc-gen-triple. DO NOT EDIT.
Source: order_api.proto
Index ¶
- Constants
- Variables
- func RegisterOrderHandler(srv *server.Server, hdlr OrderHandler, opts ...server.ServiceOption) error
- func SetConsumerService(srv common.RPCService)
- func SetProviderService(srv common.RPCService)
- type Order
- type OrderHandler
- type OrderImpl
- type OrderReq
- func (*OrderReq) Descriptor() ([]byte, []int)deprecated
- func (x *OrderReq) GetAddress() string
- func (x *OrderReq) GetCount() int32
- func (x *OrderReq) GetPhone() string
- func (x *OrderReq) GetReceiver() string
- func (x *OrderReq) GetSku() int64
- func (*OrderReq) ProtoMessage()
- func (x *OrderReq) ProtoReflect() protoreflect.Message
- func (x *OrderReq) Reset()
- func (x *OrderReq) String() string
- type OrderResp
- func (*OrderResp) Descriptor() ([]byte, []int)deprecated
- func (x *OrderResp) GetAddress() string
- func (x *OrderResp) GetEnv() string
- func (x *OrderResp) GetPhone() string
- func (x *OrderResp) GetReceiver() string
- func (*OrderResp) ProtoMessage()
- func (x *OrderResp) ProtoReflect() protoreflect.Message
- func (x *OrderResp) Reset()
- func (x *OrderResp) String() string
Constants ¶
const (
// OrderName is the fully-qualified name of the Order service.
OrderName = "org.apache.dubbogo.samples.shop.order.api.Order"
)
const (
// OrderSubmitOrderProcedure is the fully-qualified name of the Order's SubmitOrder RPC.
OrderSubmitOrderProcedure = "/org.apache.dubbogo.samples.shop.order.api.Order/SubmitOrder"
)
These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as procedure and as the final two segments of the HTTP route.
Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.
Variables ¶
var File_order_api_proto protoreflect.FileDescriptor
var Order_ClientInfo = client.ClientInfo{ InterfaceName: "org.apache.dubbogo.samples.shop.order.api.Order", MethodNames: []string{"SubmitOrder"}, ConnectionInjectFunc: func(dubboCliRaw interface{}, conn *client.Connection) { dubboCli := dubboCliRaw.(*OrderImpl) dubboCli.conn = conn }, }
var Order_ServiceInfo = server.ServiceInfo{ InterfaceName: "org.apache.dubbogo.samples.shop.order.api.Order", ServiceType: (*OrderHandler)(nil), Methods: []server.MethodInfo{ { Name: "SubmitOrder", Type: constant.CallUnary, ReqInitFunc: func() interface{} { return new(OrderReq) }, MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) { req := args[0].(*OrderReq) res, err := handler.(OrderHandler).SubmitOrder(ctx, req) if err != nil { return nil, err } return triple_protocol.NewResponse(res), nil }, }, }, }
Functions ¶
func RegisterOrderHandler ¶
func RegisterOrderHandler(srv *server.Server, hdlr OrderHandler, opts ...server.ServiceOption) error
func SetConsumerService ¶
func SetConsumerService(srv common.RPCService)
func SetProviderService ¶
func SetProviderService(srv common.RPCService)
Types ¶
type Order ¶
type Order interface {
SubmitOrder(ctx context.Context, req *OrderReq, opts ...client.CallOption) (*OrderResp, error)
}
Order is a client for the org.apache.dubbogo.samples.shop.order.api.Order service.
type OrderHandler ¶
OrderHandler is an implementation of the org.apache.dubbogo.samples.shop.order.api.Order service.
type OrderImpl ¶
type OrderImpl struct {
// contains filtered or unexported fields
}
OrderImpl implements Order.
func (*OrderImpl) SubmitOrder ¶
type OrderReq ¶
type OrderReq struct { Sku int64 `protobuf:"varint,1,opt,name=Sku,proto3" json:"Sku,omitempty"` Count int32 `protobuf:"varint,2,opt,name=Count,proto3" json:"Count,omitempty"` Address string `protobuf:"bytes,3,opt,name=Address,proto3" json:"Address,omitempty"` Phone string `protobuf:"bytes,4,opt,name=Phone,proto3" json:"Phone,omitempty"` Receiver string `protobuf:"bytes,5,opt,name=Receiver,proto3" json:"Receiver,omitempty"` // contains filtered or unexported fields }
func (*OrderReq) Descriptor
deprecated
func (*OrderReq) GetAddress ¶
func (*OrderReq) GetReceiver ¶
func (*OrderReq) ProtoMessage ¶
func (*OrderReq) ProtoMessage()
func (*OrderReq) ProtoReflect ¶
func (x *OrderReq) ProtoReflect() protoreflect.Message
type OrderResp ¶
type OrderResp struct { Env string `protobuf:"bytes,1,opt,name=Env,proto3" json:"Env,omitempty"` Address string `protobuf:"bytes,2,opt,name=Address,proto3" json:"Address,omitempty"` Phone string `protobuf:"bytes,3,opt,name=Phone,proto3" json:"Phone,omitempty"` Receiver string `protobuf:"bytes,4,opt,name=Receiver,proto3" json:"Receiver,omitempty"` // contains filtered or unexported fields }
func (*OrderResp) Descriptor
deprecated
func (*OrderResp) GetAddress ¶
func (*OrderResp) GetReceiver ¶
func (*OrderResp) ProtoMessage ¶
func (*OrderResp) ProtoMessage()
func (*OrderResp) ProtoReflect ¶
func (x *OrderResp) ProtoReflect() protoreflect.Message