notificationv1

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: Apache-2.0 Imports: 22 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Type                = "NotificationService"
	GRPCServiceFullName = "plugin.notification.v1.NotificationService"
)
View Source
const (
	NotificationService_SendNotification_FullMethodName = "/plugin.notification.v1.NotificationService/SendNotification"
)

Variables

View Source
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.

View Source
var File_plugin_notification_v1_notification_proto protoreflect.FileDescriptor
View Source
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.

type NotificationServicePluginClient

type NotificationServicePluginClient struct {
	NotificationServiceClient
}

func (*NotificationServicePluginClient) GRPCServiceName

func (c *NotificationServicePluginClient) GRPCServiceName() string

func (*NotificationServicePluginClient) InitClient

func (*NotificationServicePluginClient) IsInitialized

func (c *NotificationServicePluginClient) IsInitialized() bool

func (NotificationServicePluginClient) Type

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) Enum

func (NotificationType) EnumDescriptor deprecated

func (NotificationType) EnumDescriptor() ([]byte, []int)

Deprecated: Use NotificationType.Descriptor instead.

func (NotificationType) Number

func (NotificationType) String

func (x NotificationType) String() string

func (NotificationType) Type

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

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

Cause function returns cause value.

func (SendNotificationRequestValidationError) Error

Error satisfies the builtin error interface

func (SendNotificationRequestValidationError) ErrorName

ErrorName returns error name.

func (SendNotificationRequestValidationError) Field

Field function returns field value.

func (SendNotificationRequestValidationError) Key

Key function returns key value.

func (SendNotificationRequestValidationError) Reason

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

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

Cause function returns cause value.

func (SendNotificationResponseValidationError) Error

Error satisfies the builtin error interface

func (SendNotificationResponseValidationError) ErrorName

ErrorName returns error name.

func (SendNotificationResponseValidationError) Field

Field function returns field value.

func (SendNotificationResponseValidationError) Key

Key function returns key value.

func (SendNotificationResponseValidationError) Reason

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

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