pb

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_pb_helloworldgrpc_proto protoreflect.FileDescriptor
View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pb.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SayHello",
			Handler:    _Service_SayHello_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pb/helloworldgrpc.proto",
}

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

Functions

func RegisterServiceServer

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

Types

type SayHelloRequest

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

The request message of SayHello.

func (*SayHelloRequest) Descriptor deprecated

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

Deprecated: Use SayHelloRequest.ProtoReflect.Descriptor instead.

func (*SayHelloRequest) GetName

func (x *SayHelloRequest) GetName() string

func (*SayHelloRequest) ProtoMessage

func (*SayHelloRequest) ProtoMessage()

func (*SayHelloRequest) ProtoReflect

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

func (*SayHelloRequest) Reset

func (x *SayHelloRequest) Reset()

func (*SayHelloRequest) String

func (x *SayHelloRequest) String() string

type SayHelloResponse

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

The response message of SayHello.

func (*SayHelloResponse) Descriptor deprecated

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

Deprecated: Use SayHelloResponse.ProtoReflect.Descriptor instead.

func (*SayHelloResponse) GetMessage

func (x *SayHelloResponse) GetMessage() string

func (*SayHelloResponse) ProtoMessage

func (*SayHelloResponse) ProtoMessage()

func (*SayHelloResponse) ProtoReflect

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

func (*SayHelloResponse) Reset

func (x *SayHelloResponse) Reset()

func (*SayHelloResponse) String

func (x *SayHelloResponse) String() string

type ServiceClient

type ServiceClient interface {
	// SayHello says hello to the given name.
	SayHello(ctx context.Context, in *SayHelloRequest, opts ...grpc.CallOption) (*SayHelloResponse, error)
}

ServiceClient is the client API for Service 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.

func NewServiceClient

func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient

type ServiceServer

type ServiceServer interface {
	// SayHello says hello to the given name.
	SayHello(context.Context, *SayHelloRequest) (*SayHelloResponse, error)
	// contains filtered or unexported methods
}

ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) SayHello

type UnsafeServiceServer

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

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

Jump to

Keyboard shortcuts

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