blob: 86aa0940a1ad2837739302a6874c8da02788983c [file] [log] [blame]
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: webhook/v1alpha1/event.proto
package webhookv1alpha1
import (
context "context"
)
import (
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 (
EventService_Event_FullMethodName = "/bufman.dubbo.apache.org.webhook.v1alpha1.EventService/Event"
)
// EventServiceClient is the client API for EventService 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 EventServiceClient interface {
// Event is the rpc which receives webhook events.
Event(ctx context.Context, in *EventRequest, opts ...grpc.CallOption) (*EventResponse, error)
}
type eventServiceClient struct {
cc grpc.ClientConnInterface
}
func NewEventServiceClient(cc grpc.ClientConnInterface) EventServiceClient {
return &eventServiceClient{cc}
}
func (c *eventServiceClient) Event(ctx context.Context, in *EventRequest, opts ...grpc.CallOption) (*EventResponse, error) {
out := new(EventResponse)
err := c.cc.Invoke(ctx, EventService_Event_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// EventServiceServer is the server API for EventService service.
// All implementations must embed UnimplementedEventServiceServer
// for forward compatibility
type EventServiceServer interface {
// Event is the rpc which receives webhook events.
Event(context.Context, *EventRequest) (*EventResponse, error)
mustEmbedUnimplementedEventServiceServer()
}
// UnimplementedEventServiceServer must be embedded to have forward compatible implementations.
type UnimplementedEventServiceServer struct {
}
func (UnimplementedEventServiceServer) Event(context.Context, *EventRequest) (*EventResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Event not implemented")
}
func (UnimplementedEventServiceServer) mustEmbedUnimplementedEventServiceServer() {}
// UnsafeEventServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to EventServiceServer will
// result in compilation errors.
type UnsafeEventServiceServer interface {
mustEmbedUnimplementedEventServiceServer()
}
func RegisterEventServiceServer(s grpc.ServiceRegistrar, srv EventServiceServer) {
s.RegisterService(&EventService_ServiceDesc, srv)
}
func _EventService_Event_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(EventRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EventServiceServer).Event(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: EventService_Event_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EventServiceServer).Event(ctx, req.(*EventRequest))
}
return interceptor(ctx, in, info, handler)
}
// EventService_ServiceDesc is the grpc.ServiceDesc for EventService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var EventService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "bufman.dubbo.apache.org.webhook.v1alpha1.EventService",
HandlerType: (*EventServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Event",
Handler: _EventService_Event_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "webhook/v1alpha1/event.proto",
}