biz

package
v0.0.0-...-fefde71 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NotificationService_SendNotification_FullMethodName    = "/notification.NotificationService/SendNotification"
	NotificationService_ListMyNotifications_FullMethodName = "/notification.NotificationService/ListMyNotifications"
)

Variables

View Source
var File_domain_notification_biz_notification_proto protoreflect.FileDescriptor
View Source
var NotificationService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "notification.NotificationService",
	HandlerType: (*NotificationServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SendNotification",
			Handler:    _NotificationService_SendNotification_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ListMyNotifications",
			Handler:       _NotificationService_ListMyNotifications_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "domain/notification/biz/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 ListMyNotificationsRequest

type ListMyNotificationsRequest struct {
	Page     int64 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
	PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// contains filtered or unexported fields
}

func (*ListMyNotificationsRequest) Descriptor deprecated

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

Deprecated: Use ListMyNotificationsRequest.ProtoReflect.Descriptor instead.

func (*ListMyNotificationsRequest) GetPage

func (x *ListMyNotificationsRequest) GetPage() int64

func (*ListMyNotificationsRequest) GetPageSize

func (x *ListMyNotificationsRequest) GetPageSize() int64

func (*ListMyNotificationsRequest) ProtoMessage

func (*ListMyNotificationsRequest) ProtoMessage()

func (*ListMyNotificationsRequest) ProtoReflect

func (*ListMyNotificationsRequest) Reset

func (x *ListMyNotificationsRequest) Reset()

func (*ListMyNotificationsRequest) String

func (x *ListMyNotificationsRequest) String() string

type MockNotificationServiceClient

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

MockNotificationServiceClient is a mock of NotificationServiceClient interface.

func NewMockNotificationServiceClient

func NewMockNotificationServiceClient(ctrl *gomock.Controller) *MockNotificationServiceClient

NewMockNotificationServiceClient creates a new mock instance.

func (*MockNotificationServiceClient) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockNotificationServiceClient) ListMyNotifications

ListMyNotifications mocks base method.

func (*MockNotificationServiceClient) SendNotification

SendNotification mocks base method.

type MockNotificationServiceClientMockRecorder

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

MockNotificationServiceClientMockRecorder is the mock recorder for MockNotificationServiceClient.

func (*MockNotificationServiceClientMockRecorder) ListMyNotifications

func (mr *MockNotificationServiceClientMockRecorder) ListMyNotifications(ctx, in interface{}, opts ...interface{}) *gomock.Call

ListMyNotifications indicates an expected call of ListMyNotifications.

func (*MockNotificationServiceClientMockRecorder) SendNotification

func (mr *MockNotificationServiceClientMockRecorder) SendNotification(ctx, in interface{}, opts ...interface{}) *gomock.Call

SendNotification indicates an expected call of SendNotification.

type MockNotificationServiceServer

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

MockNotificationServiceServer is a mock of NotificationServiceServer interface.

func NewMockNotificationServiceServer

func NewMockNotificationServiceServer(ctrl *gomock.Controller) *MockNotificationServiceServer

NewMockNotificationServiceServer creates a new mock instance.

func (*MockNotificationServiceServer) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockNotificationServiceServer) ListMyNotifications

ListMyNotifications mocks base method.

func (*MockNotificationServiceServer) SendNotification

SendNotification mocks base method.

type MockNotificationServiceServerMockRecorder

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

MockNotificationServiceServerMockRecorder is the mock recorder for MockNotificationServiceServer.

func (*MockNotificationServiceServerMockRecorder) ListMyNotifications

func (mr *MockNotificationServiceServerMockRecorder) ListMyNotifications(blob, server interface{}) *gomock.Call

ListMyNotifications indicates an expected call of ListMyNotifications.

func (*MockNotificationServiceServerMockRecorder) SendNotification

func (mr *MockNotificationServiceServerMockRecorder) SendNotification(ctx, in interface{}) *gomock.Call

SendNotification indicates an expected call of SendNotification.

type MockNotificationService_ListMyNotificationsClient

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

MockNotificationService_ListMyNotificationsClient is a mock of NotificationService_ListMyNotificationsClient interface.

func NewMockNotificationService_ListMyNotificationsClient

func NewMockNotificationService_ListMyNotificationsClient(ctrl *gomock.Controller) *MockNotificationService_ListMyNotificationsClient

NewMockNotificationService_ListMyNotificationsClient creates a new mock instance.

func (*MockNotificationService_ListMyNotificationsClient) CloseSend

CloseSend mocks base method.

func (*MockNotificationService_ListMyNotificationsClient) Context

Context mocks base method.

func (*MockNotificationService_ListMyNotificationsClient) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockNotificationService_ListMyNotificationsClient) Header

Header mocks base method.

func (*MockNotificationService_ListMyNotificationsClient) Recv

Recv mocks base method.

func (*MockNotificationService_ListMyNotificationsClient) RecvMsg

func (m *MockNotificationService_ListMyNotificationsClient) RecvMsg(arg0 interface{}) error

RecvMsg mocks base method.

func (*MockNotificationService_ListMyNotificationsClient) SendMsg

func (m *MockNotificationService_ListMyNotificationsClient) SendMsg(arg0 interface{}) error

SendMsg mocks base method.

func (*MockNotificationService_ListMyNotificationsClient) Trailer

Trailer mocks base method.

type MockNotificationService_ListMyNotificationsClientMockRecorder

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

MockNotificationService_ListMyNotificationsClientMockRecorder is the mock recorder for MockNotificationService_ListMyNotificationsClient.

func (*MockNotificationService_ListMyNotificationsClientMockRecorder) CloseSend

CloseSend indicates an expected call of CloseSend.

func (*MockNotificationService_ListMyNotificationsClientMockRecorder) Context

Context indicates an expected call of Context.

func (*MockNotificationService_ListMyNotificationsClientMockRecorder) Header

Header indicates an expected call of Header.

func (*MockNotificationService_ListMyNotificationsClientMockRecorder) Recv

Recv indicates an expected call of Recv.

func (*MockNotificationService_ListMyNotificationsClientMockRecorder) RecvMsg

RecvMsg indicates an expected call of RecvMsg.

func (*MockNotificationService_ListMyNotificationsClientMockRecorder) SendMsg

SendMsg indicates an expected call of SendMsg.

func (*MockNotificationService_ListMyNotificationsClientMockRecorder) Trailer

Trailer indicates an expected call of Trailer.

type MockNotificationService_ListMyNotificationsServer

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

MockNotificationService_ListMyNotificationsServer is a mock of NotificationService_ListMyNotificationsServer interface.

func NewMockNotificationService_ListMyNotificationsServer

func NewMockNotificationService_ListMyNotificationsServer(ctrl *gomock.Controller) *MockNotificationService_ListMyNotificationsServer

NewMockNotificationService_ListMyNotificationsServer creates a new mock instance.

func (*MockNotificationService_ListMyNotificationsServer) Context

Context mocks base method.

func (*MockNotificationService_ListMyNotificationsServer) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockNotificationService_ListMyNotificationsServer) RecvMsg

func (m *MockNotificationService_ListMyNotificationsServer) RecvMsg(arg0 interface{}) error

RecvMsg mocks base method.

func (*MockNotificationService_ListMyNotificationsServer) Send

Send mocks base method.

func (*MockNotificationService_ListMyNotificationsServer) SendHeader

SendHeader mocks base method.

func (*MockNotificationService_ListMyNotificationsServer) SendMsg

func (m *MockNotificationService_ListMyNotificationsServer) SendMsg(arg0 interface{}) error

SendMsg mocks base method.

func (*MockNotificationService_ListMyNotificationsServer) SetHeader

SetHeader mocks base method.

func (*MockNotificationService_ListMyNotificationsServer) SetTrailer

SetTrailer mocks base method.

type MockNotificationService_ListMyNotificationsServerMockRecorder

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

MockNotificationService_ListMyNotificationsServerMockRecorder is the mock recorder for MockNotificationService_ListMyNotificationsServer.

func (*MockNotificationService_ListMyNotificationsServerMockRecorder) Context

Context indicates an expected call of Context.

func (*MockNotificationService_ListMyNotificationsServerMockRecorder) RecvMsg

RecvMsg indicates an expected call of RecvMsg.

func (*MockNotificationService_ListMyNotificationsServerMockRecorder) Send

Send indicates an expected call of Send.

func (*MockNotificationService_ListMyNotificationsServerMockRecorder) SendHeader

SendHeader indicates an expected call of SendHeader.

func (*MockNotificationService_ListMyNotificationsServerMockRecorder) SendMsg

SendMsg indicates an expected call of SendMsg.

func (*MockNotificationService_ListMyNotificationsServerMockRecorder) SetHeader

SetHeader indicates an expected call of SetHeader.

func (*MockNotificationService_ListMyNotificationsServerMockRecorder) SetTrailer

SetTrailer indicates an expected call of SetTrailer.

type NotificationServiceClient

type NotificationServiceClient interface {
	SendNotification(ctx context.Context, in *SendNotificationRequest, opts ...grpc.CallOption) (*model.Notification, error)
	ListMyNotifications(ctx context.Context, in *ListMyNotificationsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[model.Notification], 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 NotificationServiceServer

type NotificationServiceServer interface {
	SendNotification(context.Context, *SendNotificationRequest) (*model.Notification, error)
	ListMyNotifications(*ListMyNotificationsRequest, grpc.ServerStreamingServer[model.Notification]) error
}

NotificationServiceServer is the server API for NotificationService service. All implementations should embed UnimplementedNotificationServiceServer for forward compatibility.

type NotificationService_ListMyNotificationsClient

type NotificationService_ListMyNotificationsClient = grpc.ServerStreamingClient[model.Notification]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type NotificationService_ListMyNotificationsServer

type NotificationService_ListMyNotificationsServer = grpc.ServerStreamingServer[model.Notification]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type SendNotificationRequest

type SendNotificationRequest struct {
	UserId  string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	OrderId int64  `protobuf:"varint,2,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
	Type    string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*SendNotificationRequest) Descriptor deprecated

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

Deprecated: Use SendNotificationRequest.ProtoReflect.Descriptor instead.

func (*SendNotificationRequest) GetMessage

func (x *SendNotificationRequest) GetMessage() string

func (*SendNotificationRequest) GetOrderId

func (x *SendNotificationRequest) GetOrderId() int64

func (*SendNotificationRequest) GetType

func (x *SendNotificationRequest) GetType() string

func (*SendNotificationRequest) GetUserId

func (x *SendNotificationRequest) GetUserId() 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 UnimplementedNotificationServiceServer

type UnimplementedNotificationServiceServer struct{}

UnimplementedNotificationServiceServer should 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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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