Documentation
¶
Overview ¶
Code generated by protoc-gen-triple. DO NOT EDIT.
Source: comment_api.proto
Index ¶
- Constants
- Variables
- func RegisterCommentHandler(srv *server.Server, hdlr CommentHandler, opts ...server.ServiceOption) error
- func SetConsumerService(srv common.RPCService)
- func SetProviderService(srv common.RPCService)
- type Comment
- type CommentHandler
- type CommentImpl
- type CommentReq
- type CommentResp
Constants ¶
const (
// CommentGetCommentProcedure is the fully-qualified name of the Comment's GetComment RPC.
CommentGetCommentProcedure = "/org.apache.dubbogo.samples.shop.comment.api.Comment/GetComment"
)
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 (
// CommentName is the fully-qualified name of the Comment service.
CommentName = "org.apache.dubbogo.samples.shop.comment.api.Comment"
)
Variables ¶
var Comment_ClientInfo = client.ClientInfo{ InterfaceName: "org.apache.dubbogo.samples.shop.comment.api.Comment", MethodNames: []string{"GetComment"}, ConnectionInjectFunc: func(dubboCliRaw interface{}, conn *client.Connection) { dubboCli := dubboCliRaw.(*CommentImpl) dubboCli.conn = conn }, }
var Comment_ServiceInfo = server.ServiceInfo{ InterfaceName: "org.apache.dubbogo.samples.shop.comment.api.Comment", ServiceType: (*CommentHandler)(nil), Methods: []server.MethodInfo{ { Name: "GetComment", Type: constant.CallUnary, ReqInitFunc: func() interface{} { return new(CommentReq) }, MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) { req := args[0].(*CommentReq) res, err := handler.(CommentHandler).GetComment(ctx, req) if err != nil { return nil, err } return triple_protocol.NewResponse(res), nil }, }, }, }
var File_comment_api_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCommentHandler ¶
func RegisterCommentHandler(srv *server.Server, hdlr CommentHandler, opts ...server.ServiceOption) error
func SetConsumerService ¶
func SetConsumerService(srv common.RPCService)
func SetProviderService ¶
func SetProviderService(srv common.RPCService)
Types ¶
type Comment ¶
type Comment interface {
GetComment(ctx context.Context, req *CommentReq, opts ...client.CallOption) (*CommentResp, error)
}
Comment is a client for the org.apache.dubbogo.samples.shop.comment.api.Comment service.
func NewComment ¶
NewComment constructs a client for the api.Comment service.
type CommentHandler ¶
type CommentHandler interface {
GetComment(context.Context, *CommentReq) (*CommentResp, error)
}
CommentHandler is an implementation of the org.apache.dubbogo.samples.shop.comment.api.Comment service.
type CommentImpl ¶
type CommentImpl struct {
// contains filtered or unexported fields
}
CommentImpl implements Comment.
func (*CommentImpl) GetComment ¶
func (c *CommentImpl) GetComment(ctx context.Context, req *CommentReq, opts ...client.CallOption) (*CommentResp, error)
type CommentReq ¶
type CommentReq struct { ItemName string `protobuf:"bytes,1,opt,name=ItemName,proto3" json:"ItemName,omitempty"` // contains filtered or unexported fields }
func (*CommentReq) Descriptor
deprecated
func (*CommentReq) Descriptor() ([]byte, []int)
Deprecated: Use CommentReq.ProtoReflect.Descriptor instead.
func (*CommentReq) GetItemName ¶
func (x *CommentReq) GetItemName() string
func (*CommentReq) ProtoMessage ¶
func (*CommentReq) ProtoMessage()
func (*CommentReq) ProtoReflect ¶
func (x *CommentReq) ProtoReflect() protoreflect.Message
func (*CommentReq) Reset ¶
func (x *CommentReq) Reset()
func (*CommentReq) String ¶
func (x *CommentReq) String() string
type CommentResp ¶
type CommentResp struct { Msg string `protobuf:"bytes,1,opt,name=Msg,proto3" json:"Msg,omitempty"` // contains filtered or unexported fields }
func (*CommentResp) Descriptor
deprecated
func (*CommentResp) Descriptor() ([]byte, []int)
Deprecated: Use CommentResp.ProtoReflect.Descriptor instead.
func (*CommentResp) GetMsg ¶
func (x *CommentResp) GetMsg() string
func (*CommentResp) ProtoMessage ¶
func (*CommentResp) ProtoMessage()
func (*CommentResp) ProtoReflect ¶
func (x *CommentResp) ProtoReflect() protoreflect.Message
func (*CommentResp) Reset ¶
func (x *CommentResp) Reset()
func (*CommentResp) String ¶
func (x *CommentResp) String() string