Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterEventServiceServer(s grpc.ServiceRegistrar, srv EventServiceServer)
- type EventPayload
- func (*EventPayload) Descriptor() ([]byte, []int)deprecated
- func (m *EventPayload) GetPayload() isEventPayload_Payload
- func (x *EventPayload) GetRepositoryPush() *RepositoryPushEvent
- func (*EventPayload) ProtoMessage()
- func (x *EventPayload) ProtoReflect() protoreflect.Message
- func (x *EventPayload) Reset()
- func (x *EventPayload) String() string
- type EventPayload_RepositoryPush
- type EventRequest
- func (*EventRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EventRequest) GetEvent() v1alpha1.WebhookEvent
- func (x *EventRequest) GetPayload() *EventPayload
- func (*EventRequest) ProtoMessage()
- func (x *EventRequest) ProtoReflect() protoreflect.Message
- func (x *EventRequest) Reset()
- func (x *EventRequest) String() string
- type EventResponse
- type EventServiceClient
- type EventServiceServer
- type RepositoryPushEvent
- func (*RepositoryPushEvent) Descriptor() ([]byte, []int)deprecated
- func (x *RepositoryPushEvent) GetEventTime() *timestamppb.Timestamp
- func (x *RepositoryPushEvent) GetRepository() *v1alpha1.Repository
- func (x *RepositoryPushEvent) GetRepositoryCommit() *v1alpha1.RepositoryCommit
- func (*RepositoryPushEvent) ProtoMessage()
- func (x *RepositoryPushEvent) ProtoReflect() protoreflect.Message
- func (x *RepositoryPushEvent) Reset()
- func (x *RepositoryPushEvent) String() string
- type UnimplementedEventServiceServer
- type UnsafeEventServiceServer
Constants ¶
const (
EventService_Event_FullMethodName = "/buf.alpha.webhook.v1alpha1.EventService/Event"
)
Variables ¶
var EventService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "buf.alpha.webhook.v1alpha1.EventService", HandlerType: (*EventServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Event", Handler: _EventService_Event_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "buf/alpha/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)
var File_buf_alpha_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=buf.alpha.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.
func NewEventServiceClient ¶
func NewEventServiceClient(cc grpc.ClientConnInterface) EventServiceClient
type EventServiceServer ¶
type EventServiceServer interface { // Event is the rpc which receives webhook events. Event(context.Context, *EventRequest) (*EventResponse, error) }
EventServiceServer is the server API for EventService service. All implementations should 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 should be embedded to have forward compatible implementations.
func (UnimplementedEventServiceServer) Event ¶
func (UnimplementedEventServiceServer) Event(context.Context, *EventRequest) (*EventResponse, error)
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.