178 lines
6.5 KiB
Go
178 lines
6.5 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.2.0
|
|
// - protoc v5.28.2
|
|
// source: notify.proto
|
|
|
|
package proto
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
)
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
// Requires gRPC-Go v1.32.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion7
|
|
|
|
// NotifyServiceClient is the client API for NotifyService 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 NotifyServiceClient interface {
|
|
NotifyUser(ctx context.Context, in *NotifyUserRequest, opts ...grpc.CallOption) (*NotifyResponse, error)
|
|
NotifyUserBatch(ctx context.Context, in *NotifyUserBatchRequest, opts ...grpc.CallOption) (*NotifyResponse, error)
|
|
NotifyAllUser(ctx context.Context, in *NotifyRequest, opts ...grpc.CallOption) (*NotifyResponse, error)
|
|
}
|
|
|
|
type notifyServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewNotifyServiceClient(cc grpc.ClientConnInterface) NotifyServiceClient {
|
|
return ¬ifyServiceClient{cc}
|
|
}
|
|
|
|
func (c *notifyServiceClient) NotifyUser(ctx context.Context, in *NotifyUserRequest, opts ...grpc.CallOption) (*NotifyResponse, error) {
|
|
out := new(NotifyResponse)
|
|
err := c.cc.Invoke(ctx, "/proto.NotifyService/NotifyUser", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *notifyServiceClient) NotifyUserBatch(ctx context.Context, in *NotifyUserBatchRequest, opts ...grpc.CallOption) (*NotifyResponse, error) {
|
|
out := new(NotifyResponse)
|
|
err := c.cc.Invoke(ctx, "/proto.NotifyService/NotifyUserBatch", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *notifyServiceClient) NotifyAllUser(ctx context.Context, in *NotifyRequest, opts ...grpc.CallOption) (*NotifyResponse, error) {
|
|
out := new(NotifyResponse)
|
|
err := c.cc.Invoke(ctx, "/proto.NotifyService/NotifyAllUser", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// NotifyServiceServer is the server API for NotifyService service.
|
|
// All implementations must embed UnimplementedNotifyServiceServer
|
|
// for forward compatibility
|
|
type NotifyServiceServer interface {
|
|
NotifyUser(context.Context, *NotifyUserRequest) (*NotifyResponse, error)
|
|
NotifyUserBatch(context.Context, *NotifyUserBatchRequest) (*NotifyResponse, error)
|
|
NotifyAllUser(context.Context, *NotifyRequest) (*NotifyResponse, error)
|
|
mustEmbedUnimplementedNotifyServiceServer()
|
|
}
|
|
|
|
// UnimplementedNotifyServiceServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedNotifyServiceServer struct {
|
|
}
|
|
|
|
func (UnimplementedNotifyServiceServer) NotifyUser(context.Context, *NotifyUserRequest) (*NotifyResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method NotifyUser not implemented")
|
|
}
|
|
func (UnimplementedNotifyServiceServer) NotifyUserBatch(context.Context, *NotifyUserBatchRequest) (*NotifyResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method NotifyUserBatch not implemented")
|
|
}
|
|
func (UnimplementedNotifyServiceServer) NotifyAllUser(context.Context, *NotifyRequest) (*NotifyResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method NotifyAllUser not implemented")
|
|
}
|
|
func (UnimplementedNotifyServiceServer) mustEmbedUnimplementedNotifyServiceServer() {}
|
|
|
|
// UnsafeNotifyServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to NotifyServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeNotifyServiceServer interface {
|
|
mustEmbedUnimplementedNotifyServiceServer()
|
|
}
|
|
|
|
func RegisterNotifyServiceServer(s grpc.ServiceRegistrar, srv NotifyServiceServer) {
|
|
s.RegisterService(&NotifyService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _NotifyService_NotifyUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(NotifyUserRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(NotifyServiceServer).NotifyUser(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/proto.NotifyService/NotifyUser",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(NotifyServiceServer).NotifyUser(ctx, req.(*NotifyUserRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _NotifyService_NotifyUserBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(NotifyUserBatchRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(NotifyServiceServer).NotifyUserBatch(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/proto.NotifyService/NotifyUserBatch",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(NotifyServiceServer).NotifyUserBatch(ctx, req.(*NotifyUserBatchRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _NotifyService_NotifyAllUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(NotifyRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(NotifyServiceServer).NotifyAllUser(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/proto.NotifyService/NotifyAllUser",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(NotifyServiceServer).NotifyAllUser(ctx, req.(*NotifyRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// NotifyService_ServiceDesc is the grpc.ServiceDesc for NotifyService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var NotifyService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "proto.NotifyService",
|
|
HandlerType: (*NotifyServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "NotifyUser",
|
|
Handler: _NotifyService_NotifyUser_Handler,
|
|
},
|
|
{
|
|
MethodName: "NotifyUserBatch",
|
|
Handler: _NotifyService_NotifyUserBatch_Handler,
|
|
},
|
|
{
|
|
MethodName: "NotifyAllUser",
|
|
Handler: _NotifyService_NotifyAllUser_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "notify.proto",
|
|
}
|