webhookv1alpha1

package
v0.0.0-...-83c1a15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventService_Event_FullMethodName = "/bufman.dubbo.apache.org.webhook.v1alpha1.EventService/Event"
)

Variables

View Source
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",
}

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)

View Source
var File_webhook_v1alpha1_event_proto protoreflect.FileDescriptor

Functions

func RegisterEventServiceServer

func RegisterEventServiceServer(s grpc.ServiceRegistrar, srv EventServiceServer)

Types

type EventPayload

type EventPayload struct {

	// Types that are assignable to Payload:
	//
	//	*EventPayload_RepositoryPush
	Payload isEventPayload_Payload `protobuf_oneof:"payload"`
	// contains filtered or unexported fields
}

EventPayload contains the actual event payload for all possible webhook event types.

func (*EventPayload) Descriptor deprecated

func (*EventPayload) Descriptor() ([]byte, []int)

Deprecated: Use EventPayload.ProtoReflect.Descriptor instead.

func (*EventPayload) GetPayload

func (m *EventPayload) GetPayload() isEventPayload_Payload

func (*EventPayload) GetRepositoryPush

func (x *EventPayload) GetRepositoryPush() *RepositoryPushEvent

func (*EventPayload) ProtoMessage

func (*EventPayload) ProtoMessage()

func (*EventPayload) ProtoReflect

func (x *EventPayload) ProtoReflect() protoreflect.Message

func (*EventPayload) Reset

func (x *EventPayload) Reset()

func (*EventPayload) String

func (x *EventPayload) String() string

type EventPayload_RepositoryPush

type EventPayload_RepositoryPush struct {
	RepositoryPush *RepositoryPushEvent `protobuf:"bytes,1,opt,name=repository_push,json=repositoryPush,proto3,oneof"`
}

type EventRequest

type EventRequest struct {

	// The webhook event that was triggered. This event is the same one that is
	// registered when creating a webhook in the BSR.
	Event v1alpha1.WebhookEvent `protobuf:"varint,1,opt,name=event,proto3,enum=bufman.dubbo.apache.org.registry.v1alpha1.WebhookEvent" json:"event,omitempty"`
	// The event payload of the event was triggered.
	Payload *EventPayload `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

EventRequest is the request payload that will be sent to the customer that is subscribed to webhook events in the BSR.

func (*EventRequest) Descriptor deprecated

func (*EventRequest) Descriptor() ([]byte, []int)

Deprecated: Use EventRequest.ProtoReflect.Descriptor instead.

func (*EventRequest) GetEvent

func (x *EventRequest) GetEvent() v1alpha1.WebhookEvent

func (*EventRequest) GetPayload

func (x *EventRequest) GetPayload() *EventPayload

func (*EventRequest) ProtoMessage

func (*EventRequest) ProtoMessage()

func (*EventRequest) ProtoReflect

func (x *EventRequest) ProtoReflect() protoreflect.Message

func (*EventRequest) Reset

func (x *EventRequest) Reset()

func (*EventRequest) String

func (x *EventRequest) String() string

type EventResponse

type EventResponse struct {
	// contains filtered or unexported fields
}

EventResponse is the empty response payload from the customer to Buf.

func (*EventResponse) Descriptor deprecated

func (*EventResponse) Descriptor() ([]byte, []int)

Deprecated: Use EventResponse.ProtoReflect.Descriptor instead.

func (*EventResponse) ProtoMessage

func (*EventResponse) ProtoMessage()

func (*EventResponse) ProtoReflect

func (x *EventResponse) ProtoReflect() protoreflect.Message

func (*EventResponse) Reset

func (x *EventResponse) Reset()

func (*EventResponse) String

func (x *EventResponse) String() string

type EventServiceClient

type EventServiceClient interface {
	// Event is the rpc which receives webhook events.
	Event(ctx context.Context, in *EventRequest, opts ...grpc.CallOption) (*EventResponse, error)
}

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 EventServiceServer

type EventServiceServer interface {
	// Event is the rpc which receives webhook events.
	Event(context.Context, *EventRequest) (*EventResponse, error)
	// contains filtered or unexported methods
}

EventServiceServer is the server API for EventService service. All implementations must embed UnimplementedEventServiceServer for forward compatibility

type RepositoryPushEvent

type RepositoryPushEvent struct {

	// The timestamp of the commit push.
	EventTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=event_time,json=eventTime,proto3" json:"event_time,omitempty"`
	// The repository commit that was pushed.
	RepositoryCommit *v1alpha1.RepositoryCommit `protobuf:"bytes,2,opt,name=repository_commit,json=repositoryCommit,proto3" json:"repository_commit,omitempty"`
	// The repository that was pushed.
	Repository *v1alpha1.Repository `protobuf:"bytes,3,opt,name=repository,proto3" json:"repository,omitempty"`
	// contains filtered or unexported fields
}

Payload for the event WEBHOOK_EVENT_REPOSITORY_PUSH.

func (*RepositoryPushEvent) Descriptor deprecated

func (*RepositoryPushEvent) Descriptor() ([]byte, []int)

Deprecated: Use RepositoryPushEvent.ProtoReflect.Descriptor instead.

func (*RepositoryPushEvent) GetEventTime

func (x *RepositoryPushEvent) GetEventTime() *timestamppb.Timestamp

func (*RepositoryPushEvent) GetRepository

func (x *RepositoryPushEvent) GetRepository() *v1alpha1.Repository

func (*RepositoryPushEvent) GetRepositoryCommit

func (x *RepositoryPushEvent) GetRepositoryCommit() *v1alpha1.RepositoryCommit

func (*RepositoryPushEvent) ProtoMessage

func (*RepositoryPushEvent) ProtoMessage()

func (*RepositoryPushEvent) ProtoReflect

func (x *RepositoryPushEvent) ProtoReflect() protoreflect.Message

func (*RepositoryPushEvent) Reset

func (x *RepositoryPushEvent) Reset()

func (*RepositoryPushEvent) String

func (x *RepositoryPushEvent) String() string

type UnimplementedEventServiceServer

type UnimplementedEventServiceServer struct {
}

UnimplementedEventServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedEventServiceServer) Event

type UnsafeEventServiceServer

type UnsafeEventServiceServer interface {
	// contains filtered or unexported methods
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL