Documentation
¶
Index ¶
- Constants
- Variables
- func NotificationServicePluginServer(server NotificationServiceServer) api.PluginServer
- func RegisterNotificationServiceServer(s grpc.ServiceRegistrar, srv NotificationServiceServer)
- type NotificationServiceClient
- type NotificationServicePluginClient
- type NotificationServiceServer
- type NotificationType
- func (NotificationType) Descriptor() protoreflect.EnumDescriptor
- func (x NotificationType) Enum() *NotificationType
- func (NotificationType) EnumDescriptor() ([]byte, []int)deprecated
- func (x NotificationType) Number() protoreflect.EnumNumber
- func (x NotificationType) String() string
- func (NotificationType) Type() protoreflect.EnumType
- type SendNotificationRequest
- func (*SendNotificationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SendNotificationRequest) GetBody() string
- func (x *SendNotificationRequest) GetNotificationType() NotificationType
- func (x *SendNotificationRequest) GetRecipients() []string
- func (x *SendNotificationRequest) GetSubject() string
- func (*SendNotificationRequest) ProtoMessage()
- func (x *SendNotificationRequest) ProtoReflect() protoreflect.Message
- func (x *SendNotificationRequest) Reset()
- func (x *SendNotificationRequest) String() string
- type SendNotificationResponse
- func (*SendNotificationResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SendNotificationResponse) GetMessage() string
- func (x *SendNotificationResponse) GetSuccess() bool
- func (*SendNotificationResponse) ProtoMessage()
- func (x *SendNotificationResponse) ProtoReflect() protoreflect.Message
- func (x *SendNotificationResponse) Reset()
- func (x *SendNotificationResponse) String() string
- type UnimplementedNotificationServiceServer
- type UnsafeNotificationServiceServer
Constants ¶
const ( Type = "NotificationService" GRPCServiceFullName = "plugin.notification.v1.NotificationService" )
const (
NotificationService_SendNotification_FullMethodName = "/plugin.notification.v1.NotificationService/SendNotification"
)
Variables ¶
var ( NotificationType_name = map[int32]string{ 0: "NOTIFICATION_TYPE_UNSPECIFIED", 1: "NOTIFICATION_TYPE_EMAIL", 2: "NOTIFICATION_TYPE_TEXT", 3: "NOTIFICATION_TYPE_WEB", } NotificationType_value = map[string]int32{ "NOTIFICATION_TYPE_UNSPECIFIED": 0, "NOTIFICATION_TYPE_EMAIL": 1, "NOTIFICATION_TYPE_TEXT": 2, "NOTIFICATION_TYPE_WEB": 3, } )
Enum value maps for NotificationType.
var File_plugin_notification_v1_notification_proto protoreflect.FileDescriptor
var NotificationService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "plugin.notification.v1.NotificationService", HandlerType: (*NotificationServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SendNotification", Handler: _NotificationService_SendNotification_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "plugin/notification/v1/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 NotificationServicePluginServer ¶
func NotificationServicePluginServer(server NotificationServiceServer) api.PluginServer
func RegisterNotificationServiceServer ¶
func RegisterNotificationServiceServer(s grpc.ServiceRegistrar, srv NotificationServiceServer)
Types ¶
type NotificationServiceClient ¶
type NotificationServiceClient interface {
// SendNotification sends a notification to the specified recipients
SendNotification(ctx context.Context, in *SendNotificationRequest, opts ...grpc.CallOption) (*SendNotificationResponse, 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 NotificationServicePluginClient ¶
type NotificationServicePluginClient struct {
NotificationServiceClient
}
func (*NotificationServicePluginClient) GRPCServiceName ¶
func (c *NotificationServicePluginClient) GRPCServiceName() string
func (*NotificationServicePluginClient) InitClient ¶
func (c *NotificationServicePluginClient) InitClient(conn grpc.ClientConnInterface) any
func (*NotificationServicePluginClient) IsInitialized ¶
func (c *NotificationServicePluginClient) IsInitialized() bool
func (NotificationServicePluginClient) Type ¶
func (s NotificationServicePluginClient) Type() string
type NotificationServiceServer ¶
type NotificationServiceServer interface {
// SendNotification sends a notification to the specified recipients
SendNotification(context.Context, *SendNotificationRequest) (*SendNotificationResponse, error)
// contains filtered or unexported methods
}
NotificationServiceServer is the server API for NotificationService service. All implementations must embed UnimplementedNotificationServiceServer for forward compatibility.
type NotificationType ¶
type NotificationType int32
const ( NotificationType_NOTIFICATION_TYPE_UNSPECIFIED NotificationType = 0 // Unspecified notification type NotificationType_NOTIFICATION_TYPE_EMAIL NotificationType = 1 // Email notification NotificationType_NOTIFICATION_TYPE_TEXT NotificationType = 2 // Text message notification NotificationType_NOTIFICATION_TYPE_WEB NotificationType = 3 // Web notification )
func (NotificationType) Descriptor ¶
func (NotificationType) Descriptor() protoreflect.EnumDescriptor
func (NotificationType) Enum ¶
func (x NotificationType) Enum() *NotificationType
func (NotificationType) EnumDescriptor
deprecated
func (NotificationType) EnumDescriptor() ([]byte, []int)
Deprecated: Use NotificationType.Descriptor instead.
func (NotificationType) Number ¶
func (x NotificationType) Number() protoreflect.EnumNumber
func (NotificationType) String ¶
func (x NotificationType) String() string
func (NotificationType) Type ¶
func (NotificationType) Type() protoreflect.EnumType
type SendNotificationRequest ¶
type SendNotificationRequest struct {
NotificationType NotificationType `` // Type of notification (e.g., Email, Text, Web)
/* 155-byte string literal not displayed */
Recipients []string `protobuf:"bytes,2,rep,name=recipients,proto3" json:"recipients,omitempty"` // List of recipient addresses
Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` // Subject of the notification
Body string `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"` // Body of the notification (HTML or Raw)
// contains filtered or unexported fields
}
func (*SendNotificationRequest) Descriptor
deprecated
func (*SendNotificationRequest) Descriptor() ([]byte, []int)
Deprecated: Use SendNotificationRequest.ProtoReflect.Descriptor instead.
func (*SendNotificationRequest) GetBody ¶
func (x *SendNotificationRequest) GetBody() string
func (*SendNotificationRequest) GetNotificationType ¶
func (x *SendNotificationRequest) GetNotificationType() NotificationType
func (*SendNotificationRequest) GetRecipients ¶
func (x *SendNotificationRequest) GetRecipients() []string
func (*SendNotificationRequest) GetSubject ¶
func (x *SendNotificationRequest) GetSubject() string
func (*SendNotificationRequest) ProtoMessage ¶
func (*SendNotificationRequest) ProtoMessage()
func (*SendNotificationRequest) ProtoReflect ¶
func (x *SendNotificationRequest) ProtoReflect() protoreflect.Message
func (*SendNotificationRequest) Reset ¶
func (x *SendNotificationRequest) Reset()
func (*SendNotificationRequest) String ¶
func (x *SendNotificationRequest) String() string
type SendNotificationResponse ¶
type SendNotificationResponse struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // Indicates if the notification was sent successfully
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // Additional message or error details
// contains filtered or unexported fields
}
func (*SendNotificationResponse) Descriptor
deprecated
func (*SendNotificationResponse) Descriptor() ([]byte, []int)
Deprecated: Use SendNotificationResponse.ProtoReflect.Descriptor instead.
func (*SendNotificationResponse) GetMessage ¶
func (x *SendNotificationResponse) GetMessage() string
func (*SendNotificationResponse) GetSuccess ¶
func (x *SendNotificationResponse) GetSuccess() bool
func (*SendNotificationResponse) ProtoMessage ¶
func (*SendNotificationResponse) ProtoMessage()
func (*SendNotificationResponse) ProtoReflect ¶
func (x *SendNotificationResponse) ProtoReflect() protoreflect.Message
func (*SendNotificationResponse) Reset ¶
func (x *SendNotificationResponse) Reset()
func (*SendNotificationResponse) String ¶
func (x *SendNotificationResponse) String() string
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, *SendNotificationRequest) (*SendNotificationResponse, 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.