proto

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_hello_proto protoreflect.FileDescriptor
View Source
var Hello_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Hello",
	HandlerType: (*HelloServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SayHi",
			Handler:    _Hello_SayHi_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "hello.proto",
}

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

Functions

func RegisterHelloServer

func RegisterHelloServer(s grpc.ServiceRegistrar, srv HelloServer)

Types

type HelloClient

type HelloClient interface {
	SayHi(ctx context.Context, in *SayHiRequest, opts ...grpc.CallOption) (*SayHiReply, error)
}

HelloClient is the client API for Hello 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 NewHelloClient

func NewHelloClient(cc grpc.ClientConnInterface) HelloClient

type HelloServer

type HelloServer interface {
	SayHi(context.Context, *SayHiRequest) (*SayHiReply, error)
	// contains filtered or unexported methods
}

HelloServer is the server API for Hello service. All implementations must embed UnimplementedHelloServer for forward compatibility

type SayHiReply

type SayHiReply struct {
	Code    int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*SayHiReply) Descriptor deprecated

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

Deprecated: Use SayHiReply.ProtoReflect.Descriptor instead.

func (*SayHiReply) GetCode

func (x *SayHiReply) GetCode() int32

func (*SayHiReply) GetMessage

func (x *SayHiReply) GetMessage() string

func (*SayHiReply) ProtoMessage

func (*SayHiReply) ProtoMessage()

func (*SayHiReply) ProtoReflect

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

func (*SayHiReply) Reset

func (x *SayHiReply) Reset()

func (*SayHiReply) String

func (x *SayHiReply) String() string

type SayHiRequest

type SayHiRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Age  int32  `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"`
	// contains filtered or unexported fields
}

func (*SayHiRequest) Descriptor deprecated

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

Deprecated: Use SayHiRequest.ProtoReflect.Descriptor instead.

func (*SayHiRequest) GetAge

func (x *SayHiRequest) GetAge() int32

func (*SayHiRequest) GetName

func (x *SayHiRequest) GetName() string

func (*SayHiRequest) ProtoMessage

func (*SayHiRequest) ProtoMessage()

func (*SayHiRequest) ProtoReflect

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

func (*SayHiRequest) Reset

func (x *SayHiRequest) Reset()

func (*SayHiRequest) String

func (x *SayHiRequest) String() string

type UnimplementedHelloServer

type UnimplementedHelloServer struct {
}

UnimplementedHelloServer must be embedded to have forward compatible implementations.

func (UnimplementedHelloServer) SayHi

type UnsafeHelloServer

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

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

Jump to

Keyboard shortcuts

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