blob: 76bff9cd85c012a70220e1bb04471a27e67dec5b [file] [log] [blame]
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: registry/v1alpha1/webhook.proto
package registryv1alpha1
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 (
WebhookService_CreateWebhook_FullMethodName = "/bufman.dubbo.apache.org.registry.v1alpha1.WebhookService/CreateWebhook"
WebhookService_DeleteWebhook_FullMethodName = "/bufman.dubbo.apache.org.registry.v1alpha1.WebhookService/DeleteWebhook"
WebhookService_ListWebhooks_FullMethodName = "/bufman.dubbo.apache.org.registry.v1alpha1.WebhookService/ListWebhooks"
)
// WebhookServiceClient is the client API for WebhookService 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 WebhookServiceClient interface {
// Create a webhook, subscribes to a given repository event for a callback URL
// invocation.
CreateWebhook(ctx context.Context, in *CreateWebhookRequest, opts ...grpc.CallOption) (*CreateWebhookResponse, error)
// Delete a webhook removes the event subscription.
DeleteWebhook(ctx context.Context, in *DeleteWebhookRequest, opts ...grpc.CallOption) (*DeleteWebhookResponse, error)
// Lists the webhooks subscriptions for a given repository.
ListWebhooks(ctx context.Context, in *ListWebhooksRequest, opts ...grpc.CallOption) (*ListWebhooksResponse, error)
}
type webhookServiceClient struct {
cc grpc.ClientConnInterface
}
func NewWebhookServiceClient(cc grpc.ClientConnInterface) WebhookServiceClient {
return &webhookServiceClient{cc}
}
func (c *webhookServiceClient) CreateWebhook(ctx context.Context, in *CreateWebhookRequest, opts ...grpc.CallOption) (*CreateWebhookResponse, error) {
out := new(CreateWebhookResponse)
err := c.cc.Invoke(ctx, WebhookService_CreateWebhook_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *webhookServiceClient) DeleteWebhook(ctx context.Context, in *DeleteWebhookRequest, opts ...grpc.CallOption) (*DeleteWebhookResponse, error) {
out := new(DeleteWebhookResponse)
err := c.cc.Invoke(ctx, WebhookService_DeleteWebhook_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *webhookServiceClient) ListWebhooks(ctx context.Context, in *ListWebhooksRequest, opts ...grpc.CallOption) (*ListWebhooksResponse, error) {
out := new(ListWebhooksResponse)
err := c.cc.Invoke(ctx, WebhookService_ListWebhooks_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// WebhookServiceServer is the server API for WebhookService service.
// All implementations must embed UnimplementedWebhookServiceServer
// for forward compatibility
type WebhookServiceServer interface {
// Create a webhook, subscribes to a given repository event for a callback URL
// invocation.
CreateWebhook(context.Context, *CreateWebhookRequest) (*CreateWebhookResponse, error)
// Delete a webhook removes the event subscription.
DeleteWebhook(context.Context, *DeleteWebhookRequest) (*DeleteWebhookResponse, error)
// Lists the webhooks subscriptions for a given repository.
ListWebhooks(context.Context, *ListWebhooksRequest) (*ListWebhooksResponse, error)
mustEmbedUnimplementedWebhookServiceServer()
}
// UnimplementedWebhookServiceServer must be embedded to have forward compatible implementations.
type UnimplementedWebhookServiceServer struct {
}
func (UnimplementedWebhookServiceServer) CreateWebhook(context.Context, *CreateWebhookRequest) (*CreateWebhookResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateWebhook not implemented")
}
func (UnimplementedWebhookServiceServer) DeleteWebhook(context.Context, *DeleteWebhookRequest) (*DeleteWebhookResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteWebhook not implemented")
}
func (UnimplementedWebhookServiceServer) ListWebhooks(context.Context, *ListWebhooksRequest) (*ListWebhooksResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListWebhooks not implemented")
}
func (UnimplementedWebhookServiceServer) mustEmbedUnimplementedWebhookServiceServer() {}
// UnsafeWebhookServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to WebhookServiceServer will
// result in compilation errors.
type UnsafeWebhookServiceServer interface {
mustEmbedUnimplementedWebhookServiceServer()
}
func RegisterWebhookServiceServer(s grpc.ServiceRegistrar, srv WebhookServiceServer) {
s.RegisterService(&WebhookService_ServiceDesc, srv)
}
func _WebhookService_CreateWebhook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateWebhookRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WebhookServiceServer).CreateWebhook(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: WebhookService_CreateWebhook_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WebhookServiceServer).CreateWebhook(ctx, req.(*CreateWebhookRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WebhookService_DeleteWebhook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteWebhookRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WebhookServiceServer).DeleteWebhook(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: WebhookService_DeleteWebhook_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WebhookServiceServer).DeleteWebhook(ctx, req.(*DeleteWebhookRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WebhookService_ListWebhooks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListWebhooksRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WebhookServiceServer).ListWebhooks(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: WebhookService_ListWebhooks_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WebhookServiceServer).ListWebhooks(ctx, req.(*ListWebhooksRequest))
}
return interceptor(ctx, in, info, handler)
}
// WebhookService_ServiceDesc is the grpc.ServiceDesc for WebhookService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var WebhookService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "bufman.dubbo.apache.org.registry.v1alpha1.WebhookService",
HandlerType: (*WebhookServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreateWebhook",
Handler: _WebhookService_CreateWebhook_Handler,
},
{
MethodName: "DeleteWebhook",
Handler: _WebhookService_DeleteWebhook_Handler,
},
{
MethodName: "ListWebhooks",
Handler: _WebhookService_ListWebhooks_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "registry/v1alpha1/webhook.proto",
}