Dealer/pkg/proto/notify_grpc.pb.go

198 lines
7.3 KiB
Go
Raw Normal View History

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
2024-08-01 06:05:23 +00:00
// - protoc-gen-go-grpc v1.5.1
// - protoc v5.27.1
// 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.
2024-08-01 06:05:23 +00:00
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
Notifier_NotifyUser_FullMethodName = "/proto.Notifier/NotifyUser"
Notifier_NotifyUserBatch_FullMethodName = "/proto.Notifier/NotifyUserBatch"
Notifier_NotifyAllUser_FullMethodName = "/proto.Notifier/NotifyAllUser"
)
// NotifierClient is the client API for Notifier 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 NotifierClient interface {
NotifyUser(ctx context.Context, in *NotifyUserRequest, opts ...grpc.CallOption) (*NotifyResponse, error)
2024-07-17 05:45:12 +00:00
NotifyUserBatch(ctx context.Context, in *NotifyUserBatchRequest, opts ...grpc.CallOption) (*NotifyResponse, error)
NotifyAllUser(ctx context.Context, in *NotifyRequest, opts ...grpc.CallOption) (*NotifyResponse, error)
}
type notifierClient struct {
cc grpc.ClientConnInterface
}
func NewNotifierClient(cc grpc.ClientConnInterface) NotifierClient {
return &notifierClient{cc}
}
func (c *notifierClient) NotifyUser(ctx context.Context, in *NotifyUserRequest, opts ...grpc.CallOption) (*NotifyResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(NotifyResponse)
err := c.cc.Invoke(ctx, Notifier_NotifyUser_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
2024-07-17 05:45:12 +00:00
func (c *notifierClient) NotifyUserBatch(ctx context.Context, in *NotifyUserBatchRequest, opts ...grpc.CallOption) (*NotifyResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
2024-07-17 05:45:12 +00:00
out := new(NotifyResponse)
err := c.cc.Invoke(ctx, Notifier_NotifyUserBatch_FullMethodName, in, out, cOpts...)
2024-07-17 05:45:12 +00:00
if err != nil {
return nil, err
}
return out, nil
}
func (c *notifierClient) NotifyAllUser(ctx context.Context, in *NotifyRequest, opts ...grpc.CallOption) (*NotifyResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(NotifyResponse)
err := c.cc.Invoke(ctx, Notifier_NotifyAllUser_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// NotifierServer is the server API for Notifier service.
// All implementations must embed UnimplementedNotifierServer
2024-08-01 06:05:23 +00:00
// for forward compatibility.
type NotifierServer interface {
NotifyUser(context.Context, *NotifyUserRequest) (*NotifyResponse, error)
2024-07-17 05:45:12 +00:00
NotifyUserBatch(context.Context, *NotifyUserBatchRequest) (*NotifyResponse, error)
NotifyAllUser(context.Context, *NotifyRequest) (*NotifyResponse, error)
mustEmbedUnimplementedNotifierServer()
}
2024-08-01 06:05:23 +00:00
// UnimplementedNotifierServer 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.
type UnimplementedNotifierServer struct{}
func (UnimplementedNotifierServer) NotifyUser(context.Context, *NotifyUserRequest) (*NotifyResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method NotifyUser not implemented")
}
2024-07-17 05:45:12 +00:00
func (UnimplementedNotifierServer) NotifyUserBatch(context.Context, *NotifyUserBatchRequest) (*NotifyResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method NotifyUserBatch not implemented")
}
func (UnimplementedNotifierServer) NotifyAllUser(context.Context, *NotifyRequest) (*NotifyResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method NotifyAllUser not implemented")
}
func (UnimplementedNotifierServer) mustEmbedUnimplementedNotifierServer() {}
2024-08-01 06:05:23 +00:00
func (UnimplementedNotifierServer) testEmbeddedByValue() {}
// UnsafeNotifierServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to NotifierServer will
// result in compilation errors.
type UnsafeNotifierServer interface {
mustEmbedUnimplementedNotifierServer()
}
func RegisterNotifierServer(s grpc.ServiceRegistrar, srv NotifierServer) {
2024-08-01 06:05:23 +00:00
// If the following call pancis, it indicates UnimplementedNotifierServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&Notifier_ServiceDesc, srv)
}
func _Notifier_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.(NotifierServer).NotifyUser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Notifier_NotifyUser_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NotifierServer).NotifyUser(ctx, req.(*NotifyUserRequest))
}
return interceptor(ctx, in, info, handler)
}
2024-07-17 05:45:12 +00:00
func _Notifier_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.(NotifierServer).NotifyUserBatch(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Notifier_NotifyUserBatch_FullMethodName,
2024-07-17 05:45:12 +00:00
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NotifierServer).NotifyUserBatch(ctx, req.(*NotifyUserBatchRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Notifier_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.(NotifierServer).NotifyAllUser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Notifier_NotifyAllUser_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NotifierServer).NotifyAllUser(ctx, req.(*NotifyRequest))
}
return interceptor(ctx, in, info, handler)
}
// Notifier_ServiceDesc is the grpc.ServiceDesc for Notifier service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Notifier_ServiceDesc = grpc.ServiceDesc{
ServiceName: "proto.Notifier",
HandlerType: (*NotifierServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "NotifyUser",
Handler: _Notifier_NotifyUser_Handler,
},
2024-07-17 05:45:12 +00:00
{
MethodName: "NotifyUserBatch",
Handler: _Notifier_NotifyUserBatch_Handler,
},
{
MethodName: "NotifyAllUser",
Handler: _Notifier_NotifyAllUser_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "notify.proto",
}