proto

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GreetingService_Greeting_FullMethodName       = "/example.GreetingService/Greeting"
	GreetingService_GreetingStream_FullMethodName = "/example.GreetingService/GreetingStream"
)

Variables

View Source
var File_example_proto protoreflect.FileDescriptor
View Source
var GreetingService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "example.GreetingService",
	HandlerType: (*GreetingServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Greeting",
			Handler:    _GreetingService_Greeting_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GreetingStream",
			Handler:       _GreetingService_GreetingStream_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "example.proto",
}

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

Functions

func RegisterGreetingServiceServer

func RegisterGreetingServiceServer(s grpc.ServiceRegistrar, srv GreetingServiceServer)

Types

type GreetingRequest

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

func (*GreetingRequest) Descriptor deprecated

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

Deprecated: Use GreetingRequest.ProtoReflect.Descriptor instead.

func (*GreetingRequest) GetName

func (x *GreetingRequest) GetName() string

func (*GreetingRequest) ProtoMessage

func (*GreetingRequest) ProtoMessage()

func (*GreetingRequest) ProtoReflect

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

func (*GreetingRequest) Reset

func (x *GreetingRequest) Reset()

func (*GreetingRequest) String

func (x *GreetingRequest) String() string

type GreetingResponse

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

func (*GreetingResponse) Descriptor deprecated

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

Deprecated: Use GreetingResponse.ProtoReflect.Descriptor instead.

func (*GreetingResponse) GetMessage

func (x *GreetingResponse) GetMessage() string

func (*GreetingResponse) ProtoMessage

func (*GreetingResponse) ProtoMessage()

func (*GreetingResponse) ProtoReflect

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

func (*GreetingResponse) Reset

func (x *GreetingResponse) Reset()

func (*GreetingResponse) String

func (x *GreetingResponse) String() string

type GreetingServiceClient

type GreetingServiceClient interface {
	Greeting(ctx context.Context, in *GreetingRequest, opts ...grpc.CallOption) (*GreetingResponse, error)
	GreetingStream(ctx context.Context, opts ...grpc.CallOption) (GreetingService_GreetingStreamClient, error)
}

GreetingServiceClient is the client API for GreetingService 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 GreetingServiceServer

type GreetingServiceServer interface {
	Greeting(context.Context, *GreetingRequest) (*GreetingResponse, error)
	GreetingStream(GreetingService_GreetingStreamServer) error
	// contains filtered or unexported methods
}

GreetingServiceServer is the server API for GreetingService service. All implementations must embed UnimplementedGreetingServiceServer for forward compatibility

type GreetingService_GreetingStreamClient

type GreetingService_GreetingStreamClient interface {
	Send(*GreetingRequest) error
	Recv() (*GreetingResponse, error)
	grpc.ClientStream
}

type GreetingService_GreetingStreamServer

type GreetingService_GreetingStreamServer interface {
	Send(*GreetingResponse) error
	Recv() (*GreetingRequest, error)
	grpc.ServerStream
}

type UnimplementedGreetingServiceServer

type UnimplementedGreetingServiceServer struct {
}

UnimplementedGreetingServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedGreetingServiceServer) Greeting

func (UnimplementedGreetingServiceServer) GreetingStream

type UnsafeGreetingServiceServer

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

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

Jump to

Keyboard shortcuts

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