Documentation ¶
Index ¶
- Variables
- func RegisterGoChatServer(s grpc.ServiceRegistrar, srv GoChatServer)
- type ChatRequest
- func (*ChatRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ChatRequest) GetFrom() *Handle
- func (x *ChatRequest) GetMessage() string
- func (x *ChatRequest) GetTo() *Handle
- func (*ChatRequest) ProtoMessage()
- func (x *ChatRequest) ProtoReflect() protoreflect.Message
- func (x *ChatRequest) Reset()
- func (x *ChatRequest) String() string
- type ChatResponse
- type GoChatClient
- type GoChatServer
- type Handle
- type UnimplementedGoChatServer
- type UnsafeGoChatServer
Constants ¶
This section is empty.
Variables ¶
var File_api_proto protoreflect.FileDescriptor
var GoChat_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.GoChat", HandlerType: (*GoChatServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Chat", Handler: _GoChat_Chat_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api.proto", }
GoChat_ServiceDesc is the grpc.ServiceDesc for GoChat service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGoChatServer ¶
func RegisterGoChatServer(s grpc.ServiceRegistrar, srv GoChatServer)
Types ¶
type ChatRequest ¶
type ChatRequest struct { From *Handle `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` To *Handle `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*ChatRequest) Descriptor
deprecated
func (*ChatRequest) Descriptor() ([]byte, []int)
Deprecated: Use ChatRequest.ProtoReflect.Descriptor instead.
func (*ChatRequest) GetFrom ¶
func (x *ChatRequest) GetFrom() *Handle
func (*ChatRequest) GetMessage ¶
func (x *ChatRequest) GetMessage() string
func (*ChatRequest) GetTo ¶
func (x *ChatRequest) GetTo() *Handle
func (*ChatRequest) ProtoMessage ¶
func (*ChatRequest) ProtoMessage()
func (*ChatRequest) ProtoReflect ¶
func (x *ChatRequest) ProtoReflect() protoreflect.Message
func (*ChatRequest) Reset ¶
func (x *ChatRequest) Reset()
func (*ChatRequest) String ¶
func (x *ChatRequest) String() string
type ChatResponse ¶
type ChatResponse struct { NotFound bool `protobuf:"varint,1,opt,name=not_found,json=notFound,proto3" json:"not_found,omitempty"` // contains filtered or unexported fields }
func (*ChatResponse) Descriptor
deprecated
func (*ChatResponse) Descriptor() ([]byte, []int)
Deprecated: Use ChatResponse.ProtoReflect.Descriptor instead.
func (*ChatResponse) GetNotFound ¶
func (x *ChatResponse) GetNotFound() bool
func (*ChatResponse) ProtoMessage ¶
func (*ChatResponse) ProtoMessage()
func (*ChatResponse) ProtoReflect ¶
func (x *ChatResponse) ProtoReflect() protoreflect.Message
func (*ChatResponse) Reset ¶
func (x *ChatResponse) Reset()
func (*ChatResponse) String ¶
func (x *ChatResponse) String() string
type GoChatClient ¶
type GoChatClient interface {
Chat(ctx context.Context, in *ChatRequest, opts ...grpc.CallOption) (*ChatResponse, error)
}
GoChatClient is the client API for GoChat 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 NewGoChatClient ¶
func NewGoChatClient(cc grpc.ClientConnInterface) GoChatClient
type GoChatServer ¶
type GoChatServer interface { Chat(context.Context, *ChatRequest) (*ChatResponse, error) // contains filtered or unexported methods }
GoChatServer is the server API for GoChat service. All implementations must embed UnimplementedGoChatServer for forward compatibility
type Handle ¶
type Handle struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Host string `protobuf:"bytes,2,opt,name=host,proto3" json:"host,omitempty"` Port int32 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"` // contains filtered or unexported fields }
func (*Handle) Descriptor
deprecated
func (*Handle) ProtoMessage ¶
func (*Handle) ProtoMessage()
func (*Handle) ProtoReflect ¶
func (x *Handle) ProtoReflect() protoreflect.Message
type UnimplementedGoChatServer ¶
type UnimplementedGoChatServer struct { }
UnimplementedGoChatServer must be embedded to have forward compatible implementations.
func (UnimplementedGoChatServer) Chat ¶
func (UnimplementedGoChatServer) Chat(context.Context, *ChatRequest) (*ChatResponse, error)
type UnsafeGoChatServer ¶
type UnsafeGoChatServer interface {
// contains filtered or unexported methods
}
UnsafeGoChatServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GoChatServer will result in compilation errors.