Documentation ¶
Index ¶
- Variables
- func RegisterMessengerServer(s grpc.ServiceRegistrar, srv MessengerServer)
- type MessengerClient
- type MessengerServer
- type Metagram
- func (*Metagram) Descriptor() ([]byte, []int)deprecated
- func (x *Metagram) GetContent() string
- func (x *Metagram) GetCreatedAt() *timestamppb.Timestamp
- func (x *Metagram) GetFrom() string
- func (x *Metagram) GetId() string
- func (*Metagram) ProtoMessage()
- func (x *Metagram) ProtoReflect() protoreflect.Message
- func (x *Metagram) Reset()
- func (x *Metagram) String() string
- type UnimplementedMessengerServer
- type UnsafeMessengerServer
Constants ¶
This section is empty.
Variables ¶
var File_pb_messenger_proto protoreflect.FileDescriptor
var Messenger_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pb.Messenger", HandlerType: (*MessengerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SendMetagram", Handler: _Messenger_SendMetagram_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pb/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 MessengerClient ¶
type MessengerClient interface {
SendMetagram(ctx context.Context, in *Metagram, opts ...grpc.CallOption) (*Metagram, 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 { SendMetagram(context.Context, *Metagram) (*Metagram, error) // contains filtered or unexported methods }
MessengerServer is the server API for Messenger service. All implementations must embed UnimplementedMessengerServer for forward compatibility
type Metagram ¶
type Metagram struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` From string `protobuf:"bytes,3,opt,name=from,proto3" json:"from,omitempty"` Content string `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"` // contains filtered or unexported fields }
func (*Metagram) Descriptor
deprecated
func (*Metagram) GetContent ¶
func (*Metagram) GetCreatedAt ¶
func (x *Metagram) GetCreatedAt() *timestamppb.Timestamp
func (*Metagram) ProtoMessage ¶
func (*Metagram) ProtoMessage()
func (*Metagram) ProtoReflect ¶
func (x *Metagram) ProtoReflect() protoreflect.Message
type UnimplementedMessengerServer ¶
type UnimplementedMessengerServer struct { }
UnimplementedMessengerServer must be embedded to have forward compatible implementations.
func (UnimplementedMessengerServer) SendMetagram ¶
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.