proto

package
v0.0.0-...-3ea7eb8 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 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 HelloWorld_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.HelloWorld",
	HandlerType: (*HelloWorldServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Call",
			Handler:    _HelloWorld_Call_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Stream",
			Handler:       _HelloWorld_Stream_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "hello.proto",
}

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

Functions

func RegisterHelloWorldServer

func RegisterHelloWorldServer(s grpc.ServiceRegistrar, srv HelloWorldServer)

Types

type Hello

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

func (*Hello) Descriptor deprecated

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

Deprecated: Use Hello.ProtoReflect.Descriptor instead.

func (*Hello) GetName

func (x *Hello) GetName() string

func (*Hello) MarshalPacket

func (this *Hello) MarshalPacket() ([]byte, error)

func (*Hello) ProtoMessage

func (*Hello) ProtoMessage()

func (*Hello) ProtoReflect

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

func (*Hello) Reset

func (x *Hello) Reset()

func (*Hello) String

func (x *Hello) String() string

func (*Hello) UnmarshalPacket

func (this *Hello) UnmarshalPacket([]byte) error

type HelloWorldClient

type HelloWorldClient interface {
	Call(ctx context.Context, in *Hello, opts ...grpc.CallOption) (*World, error)
	Stream(ctx context.Context, opts ...grpc.CallOption) (HelloWorld_StreamClient, error)
}

HelloWorldClient is the client API for HelloWorld 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 NewHelloWorldClient

func NewHelloWorldClient(cc grpc.ClientConnInterface) HelloWorldClient

type HelloWorldServer

type HelloWorldServer interface {
	Call(context.Context, *Hello) (*World, error)
	Stream(HelloWorld_StreamServer) error
	// contains filtered or unexported methods
}

HelloWorldServer is the server API for HelloWorld service. All implementations must embed UnimplementedHelloWorldServer for forward compatibility

type HelloWorld_StreamClient

type HelloWorld_StreamClient interface {
	Send(*Hello) error
	Recv() (*World, error)
	grpc.ClientStream
}

type HelloWorld_StreamServer

type HelloWorld_StreamServer interface {
	Send(*World) error
	Recv() (*Hello, error)
	grpc.ServerStream
}

type UnimplementedHelloWorldServer

type UnimplementedHelloWorldServer struct {
}

UnimplementedHelloWorldServer must be embedded to have forward compatible implementations.

func (UnimplementedHelloWorldServer) Call

func (UnimplementedHelloWorldServer) Stream

type UnsafeHelloWorldServer

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

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

type World

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

func (*World) Descriptor deprecated

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

Deprecated: Use World.ProtoReflect.Descriptor instead.

func (*World) GetMessage

func (x *World) GetMessage() string

func (*World) MarshalPacket

func (this *World) MarshalPacket() ([]byte, error)

func (*World) ProtoMessage

func (*World) ProtoMessage()

func (*World) ProtoReflect

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

func (*World) Reset

func (x *World) Reset()

func (*World) String

func (x *World) String() string

func (*World) UnmarshalPacket

func (this *World) UnmarshalPacket([]byte) error

Jump to

Keyboard shortcuts

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