overpush/proto/service_grpc.pb.go

110 lines
3.5 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc v3.12.4
// source: service.proto
package pb
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
const (
Overpush_QueueMessage_FullMethodName = "/overpush.Overpush/QueueMessage"
)
// OverpushClient is the client API for Overpush 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 OverpushClient interface {
QueueMessage(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Response, error)
}
type overpushClient struct {
cc grpc.ClientConnInterface
}
func NewOverpushClient(cc grpc.ClientConnInterface) OverpushClient {
return &overpushClient{cc}
}
func (c *overpushClient) QueueMessage(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Response, error) {
out := new(Response)
err := c.cc.Invoke(ctx, Overpush_QueueMessage_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// OverpushServer is the server API for Overpush service.
// All implementations must embed UnimplementedOverpushServer
// for forward compatibility
type OverpushServer interface {
QueueMessage(context.Context, *Message) (*Response, error)
mustEmbedUnimplementedOverpushServer()
}
// UnimplementedOverpushServer must be embedded to have forward compatible implementations.
type UnimplementedOverpushServer struct {
}
func (UnimplementedOverpushServer) QueueMessage(context.Context, *Message) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method QueueMessage not implemented")
}
func (UnimplementedOverpushServer) mustEmbedUnimplementedOverpushServer() {}
// UnsafeOverpushServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to OverpushServer will
// result in compilation errors.
type UnsafeOverpushServer interface {
mustEmbedUnimplementedOverpushServer()
}
func RegisterOverpushServer(s grpc.ServiceRegistrar, srv OverpushServer) {
s.RegisterService(&Overpush_ServiceDesc, srv)
}
func _Overpush_QueueMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Message)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OverpushServer).QueueMessage(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Overpush_QueueMessage_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OverpushServer).QueueMessage(ctx, req.(*Message))
}
return interceptor(ctx, in, info, handler)
}
// Overpush_ServiceDesc is the grpc.ServiceDesc for Overpush service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Overpush_ServiceDesc = grpc.ServiceDesc{
ServiceName: "overpush.Overpush",
HandlerType: (*OverpushServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "QueueMessage",
Handler: _Overpush_QueueMessage_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service.proto",
}