notification

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NotificationService_SendNotification_FullMethodName = "/NotificationService/SendNotification"
)

Variables

View Source
var (
	MessageType_name = map[int32]string{
		0: "RATING",
	}
	MessageType_value = map[string]int32{
		"RATING": 0,
	}
)

Enum value maps for MessageType.

View Source
var File_proto_notification_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type MessageType

type MessageType int32
const (
	MessageType_RATING MessageType = 0
)

func (MessageType) Descriptor

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

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.

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 (*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 (*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

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.

Jump to

Keyboard shortcuts

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