Documentation ¶
Overview ¶
Code generated by protoc-gen-triple. DO NOT EDIT.
Source: detail_api.proto
Index ¶
- Constants
- Variables
- func RegisterDetailHandler(srv *server.Server, hdlr DetailHandler, opts ...server.ServiceOption) error
- func SetConsumerService(srv common.RPCService)
- func SetProviderService(srv common.RPCService)
- type DeductStockReq
- func (*DeductStockReq) Descriptor() ([]byte, []int)deprecated
- func (x *DeductStockReq) GetCount() int32
- func (x *DeductStockReq) GetSku() int64
- func (*DeductStockReq) ProtoMessage()
- func (x *DeductStockReq) ProtoReflect() protoreflect.Message
- func (x *DeductStockReq) Reset()
- func (x *DeductStockReq) String() string
- type DeductStockResp
- type Detail
- type DetailHandler
- type DetailImpl
- type GetItemReq
- type Item
- func (*Item) Descriptor() ([]byte, []int)deprecated
- func (x *Item) GetComment() string
- func (x *Item) GetDescription() string
- func (x *Item) GetItemName() string
- func (x *Item) GetPrice() int64
- func (x *Item) GetSku() int64
- func (x *Item) GetStock() int32
- func (*Item) ProtoMessage()
- func (x *Item) ProtoReflect() protoreflect.Message
- func (x *Item) Reset()
- func (x *Item) String() string
Constants ¶
const ( // DetailGetItemProcedure is the fully-qualified name of the Detail's GetItem RPC. DetailGetItemProcedure = "/org.apache.dubbogo.samples.shop.detail.api.Detail/GetItem" // DetailDeductStockProcedure is the fully-qualified name of the Detail's DeductStock RPC. DetailDeductStockProcedure = "/org.apache.dubbogo.samples.shop.detail.api.Detail/DeductStock" )
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.
const (
// DetailName is the fully-qualified name of the Detail service.
DetailName = "org.apache.dubbogo.samples.shop.detail.api.Detail"
)
Variables ¶
var Detail_ClientInfo = client.ClientInfo{ InterfaceName: "org.apache.dubbogo.samples.shop.detail.api.Detail", MethodNames: []string{"GetItem", "DeductStock"}, ConnectionInjectFunc: func(dubboCliRaw interface{}, conn *client.Connection) { dubboCli := dubboCliRaw.(*DetailImpl) dubboCli.conn = conn }, }
var Detail_ServiceInfo = server.ServiceInfo{ InterfaceName: "org.apache.dubbogo.samples.shop.detail.api.Detail", ServiceType: (*DetailHandler)(nil), Methods: []server.MethodInfo{ { Name: "GetItem", Type: constant.CallUnary, ReqInitFunc: func() interface{} { return new(GetItemReq) }, MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) { req := args[0].(*GetItemReq) res, err := handler.(DetailHandler).GetItem(ctx, req) if err != nil { return nil, err } return triple_protocol.NewResponse(res), nil }, }, { Name: "DeductStock", Type: constant.CallUnary, ReqInitFunc: func() interface{} { return new(DeductStockReq) }, MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) { req := args[0].(*DeductStockReq) res, err := handler.(DetailHandler).DeductStock(ctx, req) if err != nil { return nil, err } return triple_protocol.NewResponse(res), nil }, }, }, }
var File_detail_api_proto protoreflect.FileDescriptor
Functions ¶
func RegisterDetailHandler ¶
func RegisterDetailHandler(srv *server.Server, hdlr DetailHandler, opts ...server.ServiceOption) error
func SetConsumerService ¶
func SetConsumerService(srv common.RPCService)
func SetProviderService ¶
func SetProviderService(srv common.RPCService)
Types ¶
type DeductStockReq ¶
type DeductStockReq 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"` // contains filtered or unexported fields }
func (*DeductStockReq) Descriptor
deprecated
func (*DeductStockReq) Descriptor() ([]byte, []int)
Deprecated: Use DeductStockReq.ProtoReflect.Descriptor instead.
func (*DeductStockReq) GetCount ¶
func (x *DeductStockReq) GetCount() int32
func (*DeductStockReq) GetSku ¶
func (x *DeductStockReq) GetSku() int64
func (*DeductStockReq) ProtoMessage ¶
func (*DeductStockReq) ProtoMessage()
func (*DeductStockReq) ProtoReflect ¶
func (x *DeductStockReq) ProtoReflect() protoreflect.Message
func (*DeductStockReq) Reset ¶
func (x *DeductStockReq) Reset()
func (*DeductStockReq) String ¶
func (x *DeductStockReq) String() string
type DeductStockResp ¶
type DeductStockResp struct { Success bool `protobuf:"varint,1,opt,name=Success,proto3" json:"Success,omitempty"` // contains filtered or unexported fields }
func (*DeductStockResp) Descriptor
deprecated
func (*DeductStockResp) Descriptor() ([]byte, []int)
Deprecated: Use DeductStockResp.ProtoReflect.Descriptor instead.
func (*DeductStockResp) GetSuccess ¶
func (x *DeductStockResp) GetSuccess() bool
func (*DeductStockResp) ProtoMessage ¶
func (*DeductStockResp) ProtoMessage()
func (*DeductStockResp) ProtoReflect ¶
func (x *DeductStockResp) ProtoReflect() protoreflect.Message
func (*DeductStockResp) Reset ¶
func (x *DeductStockResp) Reset()
func (*DeductStockResp) String ¶
func (x *DeductStockResp) String() string
type Detail ¶
type Detail interface { GetItem(ctx context.Context, req *GetItemReq, opts ...client.CallOption) (*Item, error) DeductStock(ctx context.Context, req *DeductStockReq, opts ...client.CallOption) (*DeductStockResp, error) }
Detail is a client for the org.apache.dubbogo.samples.shop.detail.api.Detail service.
type DetailHandler ¶
type DetailHandler interface { GetItem(context.Context, *GetItemReq) (*Item, error) DeductStock(context.Context, *DeductStockReq) (*DeductStockResp, error) }
DetailHandler is an implementation of the org.apache.dubbogo.samples.shop.detail.api.Detail service.
type DetailImpl ¶
type DetailImpl struct {
// contains filtered or unexported fields
}
DetailImpl implements Detail.
func (*DetailImpl) DeductStock ¶
func (c *DetailImpl) DeductStock(ctx context.Context, req *DeductStockReq, opts ...client.CallOption) (*DeductStockResp, error)
func (*DetailImpl) GetItem ¶
func (c *DetailImpl) GetItem(ctx context.Context, req *GetItemReq, opts ...client.CallOption) (*Item, error)
type GetItemReq ¶
type GetItemReq struct { Sku int64 `protobuf:"varint,1,opt,name=Sku,proto3" json:"Sku,omitempty"` UserName string `protobuf:"bytes,2,opt,name=UserName,proto3" json:"UserName,omitempty"` // contains filtered or unexported fields }
func (*GetItemReq) Descriptor
deprecated
func (*GetItemReq) Descriptor() ([]byte, []int)
Deprecated: Use GetItemReq.ProtoReflect.Descriptor instead.
func (*GetItemReq) GetSku ¶
func (x *GetItemReq) GetSku() int64
func (*GetItemReq) GetUserName ¶
func (x *GetItemReq) GetUserName() string
func (*GetItemReq) ProtoMessage ¶
func (*GetItemReq) ProtoMessage()
func (*GetItemReq) ProtoReflect ¶
func (x *GetItemReq) ProtoReflect() protoreflect.Message
func (*GetItemReq) Reset ¶
func (x *GetItemReq) Reset()
func (*GetItemReq) String ¶
func (x *GetItemReq) String() string
type Item ¶
type Item struct { Sku int64 `protobuf:"varint,1,opt,name=Sku,proto3" json:"Sku,omitempty"` ItemName string `protobuf:"bytes,2,opt,name=ItemName,proto3" json:"ItemName,omitempty"` Description string `protobuf:"bytes,3,opt,name=Description,proto3" json:"Description,omitempty"` Stock int32 `protobuf:"varint,4,opt,name=Stock,proto3" json:"Stock,omitempty"` Price int64 `protobuf:"varint,5,opt,name=Price,proto3" json:"Price,omitempty"` Comment string `protobuf:"bytes,6,opt,name=Comment,proto3" json:"Comment,omitempty"` // contains filtered or unexported fields }
func (*Item) Descriptor
deprecated
func (*Item) GetComment ¶
func (*Item) GetDescription ¶
func (*Item) GetItemName ¶
func (*Item) ProtoMessage ¶
func (*Item) ProtoMessage()
func (*Item) ProtoReflect ¶
func (x *Item) ProtoReflect() protoreflect.Message