Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterNotificationServiceServer(s grpc.ServiceRegistrar, srv NotificationServiceServer)
- type Empty
- type MessageType
- func (MessageType) Descriptor() protoreflect.EnumDescriptor
- func (x MessageType) Enum() *MessageType
- func (MessageType) EnumDescriptor() ([]byte, []int)deprecated
- func (x MessageType) Number() protoreflect.EnumNumber
- func (x MessageType) String() string
- func (MessageType) Type() protoreflect.EnumType
- type NotificationServiceClient
- type NotificationServiceRequest
- func (*NotificationServiceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *NotificationServiceRequest) GetDate() *timestamp.Timestamp
- func (x *NotificationServiceRequest) GetMessageType() MessageType
- func (x *NotificationServiceRequest) GetReceiverId() string
- func (x *NotificationServiceRequest) GetScore() uint64
- func (x *NotificationServiceRequest) GetSenderId() string
- func (*NotificationServiceRequest) ProtoMessage()
- func (x *NotificationServiceRequest) ProtoReflect() protoreflect.Message
- func (x *NotificationServiceRequest) Reset()
- func (x *NotificationServiceRequest) String() string
- type NotificationServiceServer
- type UnimplementedNotificationServiceServer
- type UnsafeNotificationServiceServer
Constants ¶
const (
NotificationService_SendNotification_FullMethodName = "/NotificationService/SendNotification"
)
Variables ¶
var ( MessageType_name = map[int32]string{ 0: "RATING", } MessageType_value = map[string]int32{ "RATING": 0, } )
Enum value maps for MessageType.
var File_proto_notification_proto protoreflect.FileDescriptor
var NotificationService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "NotificationService", HandlerType: (*NotificationServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SendNotification", Handler: _NotificationService_SendNotification_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/notification.proto", }
NotificationService_ServiceDesc is the grpc.ServiceDesc for NotificationService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterNotificationServiceServer ¶
func RegisterNotificationServiceServer(s grpc.ServiceRegistrar, srv NotificationServiceServer)
Types ¶
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type MessageType ¶
type MessageType int32
const (
MessageType_RATING MessageType = 0
)
func (MessageType) Descriptor ¶
func (MessageType) Descriptor() protoreflect.EnumDescriptor
func (MessageType) Enum ¶
func (x MessageType) Enum() *MessageType
func (MessageType) EnumDescriptor
deprecated
func (MessageType) EnumDescriptor() ([]byte, []int)
Deprecated: Use MessageType.Descriptor instead.
func (MessageType) Number ¶
func (x MessageType) Number() protoreflect.EnumNumber
func (MessageType) String ¶
func (x MessageType) String() string
func (MessageType) Type ¶
func (MessageType) Type() protoreflect.EnumType
type NotificationServiceClient ¶
type NotificationServiceClient interface {
SendNotification(ctx context.Context, in *NotificationServiceRequest, opts ...grpc.CallOption) (*Empty, error)
}
NotificationServiceClient is the client API for NotificationService 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 NewNotificationServiceClient ¶
func NewNotificationServiceClient(cc grpc.ClientConnInterface) NotificationServiceClient
type NotificationServiceRequest ¶
type NotificationServiceRequest struct {
Date *timestamp.Timestamp `protobuf:"bytes,1,opt,name=Date,proto3" json:"Date,omitempty"`
MessageType MessageType `protobuf:"varint,2,opt,name=message_type,json=messageType,proto3,enum=MessageType" json:"message_type,omitempty"`
SenderId string `protobuf:"bytes,3,opt,name=sender_id,json=senderId,proto3" json:"sender_id,omitempty"`
ReceiverId string `protobuf:"bytes,4,opt,name=receiver_id,json=receiverId,proto3" json:"receiver_id,omitempty"`
Score uint64 `protobuf:"varint,5,opt,name=score,proto3" json:"score,omitempty"`
// contains filtered or unexported fields
}
func (*NotificationServiceRequest) Descriptor
deprecated
func (*NotificationServiceRequest) Descriptor() ([]byte, []int)
Deprecated: Use NotificationServiceRequest.ProtoReflect.Descriptor instead.
func (*NotificationServiceRequest) GetDate ¶
func (x *NotificationServiceRequest) GetDate() *timestamp.Timestamp
func (*NotificationServiceRequest) GetMessageType ¶
func (x *NotificationServiceRequest) GetMessageType() MessageType
func (*NotificationServiceRequest) GetReceiverId ¶
func (x *NotificationServiceRequest) GetReceiverId() string
func (*NotificationServiceRequest) GetScore ¶
func (x *NotificationServiceRequest) GetScore() uint64
func (*NotificationServiceRequest) GetSenderId ¶
func (x *NotificationServiceRequest) GetSenderId() string
func (*NotificationServiceRequest) ProtoMessage ¶
func (*NotificationServiceRequest) ProtoMessage()
func (*NotificationServiceRequest) ProtoReflect ¶
func (x *NotificationServiceRequest) ProtoReflect() protoreflect.Message
func (*NotificationServiceRequest) Reset ¶
func (x *NotificationServiceRequest) Reset()
func (*NotificationServiceRequest) String ¶
func (x *NotificationServiceRequest) String() string
type NotificationServiceServer ¶
type NotificationServiceServer interface {
SendNotification(context.Context, *NotificationServiceRequest) (*Empty, error)
// contains filtered or unexported methods
}
NotificationServiceServer is the server API for NotificationService service. All implementations must embed UnimplementedNotificationServiceServer for forward compatibility.
type UnimplementedNotificationServiceServer ¶
type UnimplementedNotificationServiceServer struct{}
UnimplementedNotificationServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedNotificationServiceServer) SendNotification ¶
func (UnimplementedNotificationServiceServer) SendNotification(context.Context, *NotificationServiceRequest) (*Empty, error)
type UnsafeNotificationServiceServer ¶
type UnsafeNotificationServiceServer interface {
// contains filtered or unexported methods
}
UnsafeNotificationServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NotificationServiceServer will result in compilation errors.