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
- func (m *SendNotificationRequest) Validate() error
- func (m *SendNotificationRequest) ValidateAll() error
- type SendNotificationRequestMultiError
- type SendNotificationRequestValidationError
- func (e SendNotificationRequestValidationError) Cause() error
- func (e SendNotificationRequestValidationError) Error() string
- func (e SendNotificationRequestValidationError) ErrorName() string
- func (e SendNotificationRequestValidationError) Field() string
- func (e SendNotificationRequestValidationError) Key() bool
- func (e SendNotificationRequestValidationError) Reason() 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
- func (m *SendNotificationResponse) Validate() error
- func (m *SendNotificationResponse) ValidateAll() error
- type SendNotificationResponseMultiError
- type SendNotificationResponseValidationError
- func (e SendNotificationResponseValidationError) Cause() error
- func (e SendNotificationResponseValidationError) Error() string
- func (e SendNotificationResponseValidationError) ErrorName() string
- func (e SendNotificationResponseValidationError) Field() string
- func (e SendNotificationResponseValidationError) Key() bool
- func (e SendNotificationResponseValidationError) Reason() 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
func (*SendNotificationRequest) Validate ¶
func (m *SendNotificationRequest) Validate() error
Validate checks the field values on SendNotificationRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*SendNotificationRequest) ValidateAll ¶
func (m *SendNotificationRequest) ValidateAll() error
ValidateAll checks the field values on SendNotificationRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SendNotificationRequestMultiError, or nil if none found.
type SendNotificationRequestMultiError ¶
type SendNotificationRequestMultiError []error
SendNotificationRequestMultiError is an error wrapping multiple validation errors returned by SendNotificationRequest.ValidateAll() if the designated constraints aren't met.
func (SendNotificationRequestMultiError) AllErrors ¶
func (m SendNotificationRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SendNotificationRequestMultiError) Error ¶
func (m SendNotificationRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SendNotificationRequestValidationError ¶
type SendNotificationRequestValidationError struct {
// contains filtered or unexported fields
}
SendNotificationRequestValidationError is the validation error returned by SendNotificationRequest.Validate if the designated constraints aren't met.
func (SendNotificationRequestValidationError) Cause ¶
func (e SendNotificationRequestValidationError) Cause() error
Cause function returns cause value.
func (SendNotificationRequestValidationError) Error ¶
func (e SendNotificationRequestValidationError) Error() string
Error satisfies the builtin error interface
func (SendNotificationRequestValidationError) ErrorName ¶
func (e SendNotificationRequestValidationError) ErrorName() string
ErrorName returns error name.
func (SendNotificationRequestValidationError) Field ¶
func (e SendNotificationRequestValidationError) Field() string
Field function returns field value.
func (SendNotificationRequestValidationError) Key ¶
func (e SendNotificationRequestValidationError) Key() bool
Key function returns key value.
func (SendNotificationRequestValidationError) Reason ¶
func (e SendNotificationRequestValidationError) Reason() string
Reason function returns reason value.
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
func (*SendNotificationResponse) Validate ¶
func (m *SendNotificationResponse) Validate() error
Validate checks the field values on SendNotificationResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*SendNotificationResponse) ValidateAll ¶
func (m *SendNotificationResponse) ValidateAll() error
ValidateAll checks the field values on SendNotificationResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SendNotificationResponseMultiError, or nil if none found.
type SendNotificationResponseMultiError ¶
type SendNotificationResponseMultiError []error
SendNotificationResponseMultiError is an error wrapping multiple validation errors returned by SendNotificationResponse.ValidateAll() if the designated constraints aren't met.
func (SendNotificationResponseMultiError) AllErrors ¶
func (m SendNotificationResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SendNotificationResponseMultiError) Error ¶
func (m SendNotificationResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SendNotificationResponseValidationError ¶
type SendNotificationResponseValidationError struct {
// contains filtered or unexported fields
}
SendNotificationResponseValidationError is the validation error returned by SendNotificationResponse.Validate if the designated constraints aren't met.
func (SendNotificationResponseValidationError) Cause ¶
func (e SendNotificationResponseValidationError) Cause() error
Cause function returns cause value.
func (SendNotificationResponseValidationError) Error ¶
func (e SendNotificationResponseValidationError) Error() string
Error satisfies the builtin error interface
func (SendNotificationResponseValidationError) ErrorName ¶
func (e SendNotificationResponseValidationError) ErrorName() string
ErrorName returns error name.
func (SendNotificationResponseValidationError) Field ¶
func (e SendNotificationResponseValidationError) Field() string
Field function returns field value.
func (SendNotificationResponseValidationError) Key ¶
func (e SendNotificationResponseValidationError) Key() bool
Key function returns key value.
func (SendNotificationResponseValidationError) Reason ¶
func (e SendNotificationResponseValidationError) Reason() string
Reason function returns reason value.
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.