2024-07-21 05:51:46 +00:00
// 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
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.
2024-08-01 06:05:23 +00:00
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc . SupportPackageIsVersion9
2024-07-30 10:31:26 +00:00
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 ) {
2024-07-30 10:31:26 +00:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
2024-07-21 05:51:46 +00:00
out := new ( DeliverResponse )
2024-07-30 10:31:26 +00:00
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 ) {
2024-07-30 10:31:26 +00:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
2024-07-21 05:51:46 +00:00
out := new ( DeliverResponse )
2024-07-30 10:31:26 +00:00
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 ) {
2024-07-30 10:31:26 +00:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
2024-07-21 05:51:46 +00:00
out := new ( DeliverResponse )
2024-07-30 10:31:26 +00:00
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 ) {
2024-07-30 10:31:26 +00:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
2024-07-21 05:51:46 +00:00
out := new ( DeliverResponse )
2024-07-30 10:31:26 +00:00
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
2024-08-01 06:05:23 +00:00
// for forward compatibility.
2024-07-21 05:51:46 +00:00
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 ( )
}
2024-08-01 06:05:23 +00:00
// UnimplementedPostmanServer 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 UnimplementedPostmanServer struct { }
2024-07-21 05:51:46 +00:00
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 ( ) { }
2024-08-01 06:05:23 +00:00
func ( UnimplementedPostmanServer ) testEmbeddedByValue ( ) { }
2024-07-21 05:51:46 +00:00
// 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 ) {
2024-08-01 06:05:23 +00:00
// If the following call pancis, it indicates UnimplementedPostmanServer 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 ( )
}
2024-07-21 05:51:46 +00:00
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 ,
2024-07-30 10:31:26 +00:00
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 ,
2024-07-30 10:31:26 +00:00
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 ,
2024-07-30 10:31:26 +00:00
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 ,
2024-07-30 10:31:26 +00:00
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" ,
}