api

package
v0.0.0-...-64808f0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Code generated by protoc-gen-triple. DO NOT EDIT.

Source: comment_api.proto

Index

Constants

View Source
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.

View Source
const (
	// CommentName is the fully-qualified name of the Comment service.
	CommentName = "org.apache.dubbogo.samples.shop.comment.api.Comment"
)

Variables

View Source
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
	},
}
View Source
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
			},
		},
	},
}
View Source
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

func NewComment(cli *client.Client, opts ...client.ReferenceOption) (Comment, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL