Documentation ¶
Index ¶
- Variables
- func RegisterMessengerServer(s grpc.ServiceRegistrar, srv MessengerServer)
- type ListMessageResponse
- func (*ListMessageResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListMessageResponse) GetMessages() []*Message
- func (*ListMessageResponse) ProtoMessage()
- func (x *ListMessageResponse) ProtoReflect() protoreflect.Message
- func (x *ListMessageResponse) Reset()
- func (x *ListMessageResponse) String() string
- type Message
- type MessengerClient
- type MessengerServer
- type UnimplementedMessengerServer
- type UnsafeMessengerServer
Constants ¶
This section is empty.
Variables ¶
var File_messenger_proto protoreflect.FileDescriptor
var Messenger_ServiceDesc = grpc.ServiceDesc{ ServiceName: "contracts.Messenger", HandlerType: (*MessengerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListMessages", Handler: _Messenger_ListMessages_Handler, }, { MethodName: "AddMessage", Handler: _Messenger_AddMessage_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "messenger.proto", }
Messenger_ServiceDesc is the grpc.ServiceDesc for Messenger service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterMessengerServer ¶
func RegisterMessengerServer(s grpc.ServiceRegistrar, srv MessengerServer)
Types ¶
type ListMessageResponse ¶
type ListMessageResponse struct { Messages []*Message `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` // contains filtered or unexported fields }
func (*ListMessageResponse) Descriptor
deprecated
func (*ListMessageResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListMessageResponse.ProtoReflect.Descriptor instead.
func (*ListMessageResponse) GetMessages ¶
func (x *ListMessageResponse) GetMessages() []*Message
func (*ListMessageResponse) ProtoMessage ¶
func (*ListMessageResponse) ProtoMessage()
func (*ListMessageResponse) ProtoReflect ¶
func (x *ListMessageResponse) ProtoReflect() protoreflect.Message
func (*ListMessageResponse) Reset ¶
func (x *ListMessageResponse) Reset()
func (*ListMessageResponse) String ¶
func (x *ListMessageResponse) String() string
type Message ¶
type Message struct { Body string `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` Ts *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=ts,proto3" json:"ts,omitempty"` // contains filtered or unexported fields }
func (*Message) Descriptor
deprecated
func (*Message) GetTs ¶
func (x *Message) GetTs() *timestamppb.Timestamp
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type MessengerClient ¶
type MessengerClient interface { ListMessages(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListMessageResponse, error) AddMessage(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error) }
MessengerClient is the client API for Messenger 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 NewMessengerClient ¶
func NewMessengerClient(cc grpc.ClientConnInterface) MessengerClient
type MessengerServer ¶
type MessengerServer interface { ListMessages(context.Context, *emptypb.Empty) (*ListMessageResponse, error) AddMessage(context.Context, *Message) (*Message, error) // contains filtered or unexported methods }
MessengerServer is the server API for Messenger service. All implementations must embed UnimplementedMessengerServer for forward compatibility
type UnimplementedMessengerServer ¶
type UnimplementedMessengerServer struct { }
UnimplementedMessengerServer must be embedded to have forward compatible implementations.
func (UnimplementedMessengerServer) AddMessage ¶
func (UnimplementedMessengerServer) ListMessages ¶
func (UnimplementedMessengerServer) ListMessages(context.Context, *emptypb.Empty) (*ListMessageResponse, error)
type UnsafeMessengerServer ¶
type UnsafeMessengerServer interface {
// contains filtered or unexported methods
}
UnsafeMessengerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MessengerServer will result in compilation errors.