v1

package
v0.0.0-...-c30b888 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JavaDemoService_HelloWorld_FullMethodName                      = "/javaDemo.v1.javaDemoService/HelloWorld"
	JavaDemoService_HelloWorldClientStream_FullMethodName          = "/javaDemo.v1.javaDemoService/HelloWorldClientStream"
	JavaDemoService_HelloWorldClientAndServerStream_FullMethodName = "/javaDemo.v1.javaDemoService/HelloWorldClientAndServerStream"
)
View Source
const OperationJavaDemoServiceHelloWorld = "/javaDemo.v1.javaDemoService/HelloWorld"

Variables

View Source
var File_api_javaDemo_v1_javaDemo_proto protoreflect.FileDescriptor
View Source
var JavaDemoService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "javaDemo.v1.javaDemoService",
	HandlerType: (*JavaDemoServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "HelloWorld",
			Handler:    _JavaDemoService_HelloWorld_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "HelloWorldClientStream",
			Handler:       _JavaDemoService_HelloWorldClientStream_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "HelloWorldClientAndServerStream",
			Handler:       _JavaDemoService_HelloWorldClientAndServerStream_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "api/javaDemo/v1/javaDemo.proto",
}

JavaDemoService_ServiceDesc is the grpc.ServiceDesc for JavaDemoService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterJavaDemoServiceHTTPServer

func RegisterJavaDemoServiceHTTPServer(s *http.Server, srv JavaDemoServiceHTTPServer)

func RegisterJavaDemoServiceServer

func RegisterJavaDemoServiceServer(s grpc.ServiceRegistrar, srv JavaDemoServiceServer)

Types

type HelloRequest

type HelloRequest struct {
	Request string `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"`
	// contains filtered or unexported fields
}

func (*HelloRequest) Descriptor deprecated

func (*HelloRequest) Descriptor() ([]byte, []int)

Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.

func (*HelloRequest) GetRequest

func (x *HelloRequest) GetRequest() string

func (*HelloRequest) ProtoMessage

func (*HelloRequest) ProtoMessage()

func (*HelloRequest) ProtoReflect

func (x *HelloRequest) ProtoReflect() protoreflect.Message

func (*HelloRequest) Reset

func (x *HelloRequest) Reset()

func (*HelloRequest) String

func (x *HelloRequest) String() string

type HelloResponse

type HelloResponse struct {
	Response string `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
	// contains filtered or unexported fields
}

接口返回出参

func (*HelloResponse) Descriptor deprecated

func (*HelloResponse) Descriptor() ([]byte, []int)

Deprecated: Use HelloResponse.ProtoReflect.Descriptor instead.

func (*HelloResponse) GetResponse

func (x *HelloResponse) GetResponse() string

func (*HelloResponse) ProtoMessage

func (*HelloResponse) ProtoMessage()

func (*HelloResponse) ProtoReflect

func (x *HelloResponse) ProtoReflect() protoreflect.Message

func (*HelloResponse) Reset

func (x *HelloResponse) Reset()

func (*HelloResponse) String

func (x *HelloResponse) String() string

type JavaDemoServiceClient

type JavaDemoServiceClient interface {
	// 一个简单的rpc
	HelloWorld(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error)
	// 一个客户端流式rpc
	HelloWorldClientStream(ctx context.Context, opts ...grpc.CallOption) (JavaDemoService_HelloWorldClientStreamClient, error)
	// 一个客户端和服务器端双向流式rpc
	HelloWorldClientAndServerStream(ctx context.Context, opts ...grpc.CallOption) (JavaDemoService_HelloWorldClientAndServerStreamClient, error)
}

JavaDemoServiceClient is the client API for JavaDemoService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type JavaDemoServiceHTTPClient

type JavaDemoServiceHTTPClient interface {
	HelloWorld(ctx context.Context, req *HelloRequest, opts ...http.CallOption) (rsp *HelloResponse, err error)
}

func NewJavaDemoServiceHTTPClient

func NewJavaDemoServiceHTTPClient(client *http.Client) JavaDemoServiceHTTPClient

type JavaDemoServiceHTTPClientImpl

type JavaDemoServiceHTTPClientImpl struct {
	// contains filtered or unexported fields
}

func (*JavaDemoServiceHTTPClientImpl) HelloWorld

type JavaDemoServiceHTTPServer

type JavaDemoServiceHTTPServer interface {
	// HelloWorld一个简单的rpc
	HelloWorld(context.Context, *HelloRequest) (*HelloResponse, error)
}

type JavaDemoServiceServer

type JavaDemoServiceServer interface {
	// 一个简单的rpc
	HelloWorld(context.Context, *HelloRequest) (*HelloResponse, error)
	// 一个客户端流式rpc
	HelloWorldClientStream(JavaDemoService_HelloWorldClientStreamServer) error
	// 一个客户端和服务器端双向流式rpc
	HelloWorldClientAndServerStream(JavaDemoService_HelloWorldClientAndServerStreamServer) error
	// contains filtered or unexported methods
}

JavaDemoServiceServer is the server API for JavaDemoService service. All implementations must embed UnimplementedJavaDemoServiceServer for forward compatibility

type JavaDemoService_HelloWorldClientAndServerStreamClient

type JavaDemoService_HelloWorldClientAndServerStreamClient interface {
	Send(*HelloRequest) error
	Recv() (*HelloResponse, error)
	grpc.ClientStream
}

type JavaDemoService_HelloWorldClientAndServerStreamServer

type JavaDemoService_HelloWorldClientAndServerStreamServer interface {
	Send(*HelloResponse) error
	Recv() (*HelloRequest, error)
	grpc.ServerStream
}

type JavaDemoService_HelloWorldClientStreamClient

type JavaDemoService_HelloWorldClientStreamClient interface {
	Send(*HelloRequest) error
	CloseAndRecv() (*HelloResponse, error)
	grpc.ClientStream
}

type JavaDemoService_HelloWorldClientStreamServer

type JavaDemoService_HelloWorldClientStreamServer interface {
	SendAndClose(*HelloResponse) error
	Recv() (*HelloRequest, error)
	grpc.ServerStream
}

type UnimplementedJavaDemoServiceServer

type UnimplementedJavaDemoServiceServer struct {
}

UnimplementedJavaDemoServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedJavaDemoServiceServer) HelloWorld

func (UnimplementedJavaDemoServiceServer) HelloWorldClientAndServerStream

func (UnimplementedJavaDemoServiceServer) HelloWorldClientStream

type UnsafeJavaDemoServiceServer

type UnsafeJavaDemoServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeJavaDemoServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to JavaDemoServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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