notificationpb

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Notification_Send_FullMethodName = "/notificationpb.Notification/Send"
)

Variables

View Source
var File_examples_deployment_notification_notificationpb_notification_proto protoreflect.FileDescriptor
View Source
var Notification_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "notificationpb.Notification",
	HandlerType: (*NotificationServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Send",
			Handler:    _Notification_Send_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "examples/deployment/notification/notificationpb/notification.proto",
}

Notification_ServiceDesc is the grpc.ServiceDesc for Notification service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterNotificationServer

func RegisterNotificationServer(s grpc.ServiceRegistrar, srv NotificationServer)

Types

type NotificationClient

type NotificationClient interface {
	Send(ctx context.Context, in *SendRequest, opts ...grpc.CallOption) (*SendResponse, error)
}

NotificationClient is the client API for Notification 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.

Notification exposes the notification example's ports.Sender over gRPC. Its single RPC mirrors ports.Sender.Send exactly: a message in, nothing but an error out. This lets the same ports.Sender/ports.ServiceKey be bound to either a local implementation or this gRPC service at the composition root, with no change to the domain port itself.

type NotificationServer

type NotificationServer interface {
	Send(context.Context, *SendRequest) (*SendResponse, error)
	// contains filtered or unexported methods
}

NotificationServer is the server API for Notification service. All implementations must embed UnimplementedNotificationServer for forward compatibility.

Notification exposes the notification example's ports.Sender over gRPC. Its single RPC mirrors ports.Sender.Send exactly: a message in, nothing but an error out. This lets the same ports.Sender/ports.ServiceKey be bound to either a local implementation or this gRPC service at the composition root, with no change to the domain port itself.

type SendRequest

type SendRequest struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

SendRequest carries the notification message, matching ports.Sender.Send's message parameter.

func (*SendRequest) Descriptor deprecated

func (*SendRequest) Descriptor() ([]byte, []int)

Deprecated: Use SendRequest.ProtoReflect.Descriptor instead.

func (*SendRequest) GetMessage

func (x *SendRequest) GetMessage() string

func (*SendRequest) ProtoMessage

func (*SendRequest) ProtoMessage()

func (*SendRequest) ProtoReflect

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

func (*SendRequest) Reset

func (x *SendRequest) Reset()

func (*SendRequest) String

func (x *SendRequest) String() string

type SendResponse

type SendResponse struct {
	// contains filtered or unexported fields
}

SendResponse is intentionally empty: ports.Sender.Send returns only an error, so success carries no payload beyond an OK gRPC status.

func (*SendResponse) Descriptor deprecated

func (*SendResponse) Descriptor() ([]byte, []int)

Deprecated: Use SendResponse.ProtoReflect.Descriptor instead.

func (*SendResponse) ProtoMessage

func (*SendResponse) ProtoMessage()

func (*SendResponse) ProtoReflect

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

func (*SendResponse) Reset

func (x *SendResponse) Reset()

func (*SendResponse) String

func (x *SendResponse) String() string

type UnimplementedNotificationServer

type UnimplementedNotificationServer struct{}

UnimplementedNotificationServer 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 (UnimplementedNotificationServer) Send

type UnsafeNotificationServer

type UnsafeNotificationServer interface {
	// contains filtered or unexported methods
}

UnsafeNotificationServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NotificationServer will result in compilation errors.

Jump to

Keyboard shortcuts

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