Dealer/pkg/proto/postman_grpc.pb.go

225 lines
8.7 KiB
Go
Raw Normal View History

2024-07-21 05:51:46 +00:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
2024-07-21 05:51:46 +00:00
// - protoc v5.27.1
// source: postman.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.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
const (
Postman_DeliverNotification_FullMethodName = "/proto.Postman/DeliverNotification"
Postman_DeliverNotificationBatch_FullMethodName = "/proto.Postman/DeliverNotificationBatch"
Postman_DeliverEmail_FullMethodName = "/proto.Postman/DeliverEmail"
Postman_DeliverEmailBatch_FullMethodName = "/proto.Postman/DeliverEmailBatch"
)
2024-07-21 05:51:46 +00:00
// PostmanClient is the client API for Postman 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 PostmanClient interface {
DeliverNotification(ctx context.Context, in *DeliverNotificationRequest, opts ...grpc.CallOption) (*DeliverResponse, error)
DeliverNotificationBatch(ctx context.Context, in *DeliverNotificationBatchRequest, opts ...grpc.CallOption) (*DeliverResponse, error)
DeliverEmail(ctx context.Context, in *DeliverEmailRequest, opts ...grpc.CallOption) (*DeliverResponse, error)
DeliverEmailBatch(ctx context.Context, in *DeliverEmailBatchRequest, opts ...grpc.CallOption) (*DeliverResponse, error)
}
type postmanClient struct {
cc grpc.ClientConnInterface
}
func NewPostmanClient(cc grpc.ClientConnInterface) PostmanClient {
return &postmanClient{cc}
}
func (c *postmanClient) DeliverNotification(ctx context.Context, in *DeliverNotificationRequest, opts ...grpc.CallOption) (*DeliverResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
2024-07-21 05:51:46 +00:00
out := new(DeliverResponse)
err := c.cc.Invoke(ctx, Postman_DeliverNotification_FullMethodName, in, out, cOpts...)
2024-07-21 05:51:46 +00:00
if err != nil {
return nil, err
}
return out, nil
}
func (c *postmanClient) DeliverNotificationBatch(ctx context.Context, in *DeliverNotificationBatchRequest, opts ...grpc.CallOption) (*DeliverResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
2024-07-21 05:51:46 +00:00
out := new(DeliverResponse)
err := c.cc.Invoke(ctx, Postman_DeliverNotificationBatch_FullMethodName, in, out, cOpts...)
2024-07-21 05:51:46 +00:00
if err != nil {
return nil, err
}
return out, nil
}
func (c *postmanClient) DeliverEmail(ctx context.Context, in *DeliverEmailRequest, opts ...grpc.CallOption) (*DeliverResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
2024-07-21 05:51:46 +00:00
out := new(DeliverResponse)
err := c.cc.Invoke(ctx, Postman_DeliverEmail_FullMethodName, in, out, cOpts...)
2024-07-21 05:51:46 +00:00
if err != nil {
return nil, err
}
return out, nil
}
func (c *postmanClient) DeliverEmailBatch(ctx context.Context, in *DeliverEmailBatchRequest, opts ...grpc.CallOption) (*DeliverResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
2024-07-21 05:51:46 +00:00
out := new(DeliverResponse)
err := c.cc.Invoke(ctx, Postman_DeliverEmailBatch_FullMethodName, in, out, cOpts...)
2024-07-21 05:51:46 +00:00
if err != nil {
return nil, err
}
return out, nil
}
// PostmanServer is the server API for Postman service.
// All implementations must embed UnimplementedPostmanServer
// for forward compatibility
type PostmanServer interface {
DeliverNotification(context.Context, *DeliverNotificationRequest) (*DeliverResponse, error)
DeliverNotificationBatch(context.Context, *DeliverNotificationBatchRequest) (*DeliverResponse, error)
DeliverEmail(context.Context, *DeliverEmailRequest) (*DeliverResponse, error)
DeliverEmailBatch(context.Context, *DeliverEmailBatchRequest) (*DeliverResponse, error)
mustEmbedUnimplementedPostmanServer()
}
// UnimplementedPostmanServer must be embedded to have forward compatible implementations.
type UnimplementedPostmanServer struct {
}
func (UnimplementedPostmanServer) DeliverNotification(context.Context, *DeliverNotificationRequest) (*DeliverResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeliverNotification not implemented")
}
func (UnimplementedPostmanServer) DeliverNotificationBatch(context.Context, *DeliverNotificationBatchRequest) (*DeliverResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeliverNotificationBatch not implemented")
}
func (UnimplementedPostmanServer) DeliverEmail(context.Context, *DeliverEmailRequest) (*DeliverResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeliverEmail not implemented")
}
func (UnimplementedPostmanServer) DeliverEmailBatch(context.Context, *DeliverEmailBatchRequest) (*DeliverResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeliverEmailBatch not implemented")
}
func (UnimplementedPostmanServer) mustEmbedUnimplementedPostmanServer() {}
// UnsafePostmanServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PostmanServer will
// result in compilation errors.
type UnsafePostmanServer interface {
mustEmbedUnimplementedPostmanServer()
}
func RegisterPostmanServer(s grpc.ServiceRegistrar, srv PostmanServer) {
s.RegisterService(&Postman_ServiceDesc, srv)
}
func _Postman_DeliverNotification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeliverNotificationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostmanServer).DeliverNotification(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Postman_DeliverNotification_FullMethodName,
2024-07-21 05:51:46 +00:00
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostmanServer).DeliverNotification(ctx, req.(*DeliverNotificationRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Postman_DeliverNotificationBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeliverNotificationBatchRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostmanServer).DeliverNotificationBatch(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Postman_DeliverNotificationBatch_FullMethodName,
2024-07-21 05:51:46 +00:00
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostmanServer).DeliverNotificationBatch(ctx, req.(*DeliverNotificationBatchRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Postman_DeliverEmail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeliverEmailRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostmanServer).DeliverEmail(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Postman_DeliverEmail_FullMethodName,
2024-07-21 05:51:46 +00:00
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostmanServer).DeliverEmail(ctx, req.(*DeliverEmailRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Postman_DeliverEmailBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeliverEmailBatchRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PostmanServer).DeliverEmailBatch(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Postman_DeliverEmailBatch_FullMethodName,
2024-07-21 05:51:46 +00:00
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PostmanServer).DeliverEmailBatch(ctx, req.(*DeliverEmailBatchRequest))
}
return interceptor(ctx, in, info, handler)
}
// Postman_ServiceDesc is the grpc.ServiceDesc for Postman service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Postman_ServiceDesc = grpc.ServiceDesc{
ServiceName: "proto.Postman",
HandlerType: (*PostmanServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "DeliverNotification",
Handler: _Postman_DeliverNotification_Handler,
},
{
MethodName: "DeliverNotificationBatch",
Handler: _Postman_DeliverNotificationBatch_Handler,
},
{
MethodName: "DeliverEmail",
Handler: _Postman_DeliverEmail_Handler,
},
{
MethodName: "DeliverEmailBatch",
Handler: _Postman_DeliverEmailBatch_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "postman.proto",
}