Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterGitstafetteServer(s *grpc.Server, srv GitstafetteServer)
- type GRPCClientConfig
- type GRPCServerConfig
- type GitstafetteClient
- type GitstafetteServer
- type Gitstafette_FetchWebhookEventsClient
- type Gitstafette_FetchWebhookEventsServer
- type Gitstafette_WebhookEventStatusesClient
- type Gitstafette_WebhookEventStatusesServer
- type Header
- type RelayConfig
- type ServerConfig
- type UnimplementedGitstafetteServer
- func (UnimplementedGitstafetteServer) FetchWebhookEvents(*WebhookEventsRequest, Gitstafette_FetchWebhookEventsServer) error
- func (UnimplementedGitstafetteServer) WebhookEventPush(context.Context, *WebhookEventPushRequest) (*WebhookEventPushResponse, error)
- func (UnimplementedGitstafetteServer) WebhookEventStatus(context.Context, *WebhookEventStatusRequest) (*WebhookEventStatusResponse, error)
- func (UnimplementedGitstafetteServer) WebhookEventStatuses(*WebhookEventStatusesRequest, Gitstafette_WebhookEventStatusesServer) error
- type UnsafeGitstafetteServer
- type WebhookEvent
- func (*WebhookEvent) Descriptor() ([]byte, []int)deprecated
- func (x *WebhookEvent) GetBody() []byte
- func (x *WebhookEvent) GetEventId() string
- func (x *WebhookEvent) GetHeaders() []*Header
- func (*WebhookEvent) ProtoMessage()
- func (x *WebhookEvent) ProtoReflect() protoreflect.Message
- func (x *WebhookEvent) Reset()
- func (x *WebhookEvent) String() string
- type WebhookEventHeader
- type WebhookEventInternal
- type WebhookEventPushRequest
- func (*WebhookEventPushRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WebhookEventPushRequest) GetCliendId() string
- func (x *WebhookEventPushRequest) GetRepositoryId() string
- func (x *WebhookEventPushRequest) GetWebhookEvent() *WebhookEvent
- func (*WebhookEventPushRequest) ProtoMessage()
- func (x *WebhookEventPushRequest) ProtoReflect() protoreflect.Message
- func (x *WebhookEventPushRequest) Reset()
- func (x *WebhookEventPushRequest) String() string
- type WebhookEventPushResponse
- func (*WebhookEventPushResponse) Descriptor() ([]byte, []int)deprecated
- func (x *WebhookEventPushResponse) GetAccepted() bool
- func (x *WebhookEventPushResponse) GetResponseCode() string
- func (x *WebhookEventPushResponse) GetResponseDescription() string
- func (*WebhookEventPushResponse) ProtoMessage()
- func (x *WebhookEventPushResponse) ProtoReflect() protoreflect.Message
- func (x *WebhookEventPushResponse) Reset()
- func (x *WebhookEventPushResponse) String() string
- type WebhookEventStatusRequest
- func (*WebhookEventStatusRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WebhookEventStatusRequest) GetClientId() string
- func (x *WebhookEventStatusRequest) GetRepositoryId() string
- func (*WebhookEventStatusRequest) ProtoMessage()
- func (x *WebhookEventStatusRequest) ProtoReflect() protoreflect.Message
- func (x *WebhookEventStatusRequest) Reset()
- func (x *WebhookEventStatusRequest) String() string
- type WebhookEventStatusResponse
- func (*WebhookEventStatusResponse) Descriptor() ([]byte, []int)deprecated
- func (x *WebhookEventStatusResponse) GetCount() uint32
- func (x *WebhookEventStatusResponse) GetRepositoryId() string
- func (x *WebhookEventStatusResponse) GetServerId() string
- func (x *WebhookEventStatusResponse) GetStatus() string
- func (*WebhookEventStatusResponse) ProtoMessage()
- func (x *WebhookEventStatusResponse) ProtoReflect() protoreflect.Message
- func (x *WebhookEventStatusResponse) Reset()
- func (x *WebhookEventStatusResponse) String() string
- type WebhookEventStatusesRequest
- func (*WebhookEventStatusesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WebhookEventStatusesRequest) GetClientId() string
- func (*WebhookEventStatusesRequest) ProtoMessage()
- func (x *WebhookEventStatusesRequest) ProtoReflect() protoreflect.Message
- func (x *WebhookEventStatusesRequest) Reset()
- func (x *WebhookEventStatusesRequest) String() string
- type WebhookEventsRequest
- func (*WebhookEventsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WebhookEventsRequest) GetClientId() string
- func (x *WebhookEventsRequest) GetDurationSecs() uint32
- func (x *WebhookEventsRequest) GetLastReceivedEventId() uint64
- func (x *WebhookEventsRequest) GetRepositoryId() string
- func (*WebhookEventsRequest) ProtoMessage()
- func (x *WebhookEventsRequest) ProtoReflect() protoreflect.Message
- func (x *WebhookEventsRequest) Reset()
- func (x *WebhookEventsRequest) String() string
- type WebhookEventsResponse
- func (*WebhookEventsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *WebhookEventsResponse) GetWebhookEvents() []*WebhookEvent
- func (*WebhookEventsResponse) ProtoMessage()
- func (x *WebhookEventsResponse) ProtoReflect() protoreflect.Message
- func (x *WebhookEventsResponse) Reset()
- func (x *WebhookEventsResponse) String() string
Constants ¶
const DeliveryIdHeader = "X-Github-Delivery"
Variables ¶
var File_api_v1_gitstafette_proto protoreflect.FileDescriptor
Functions ¶
func RegisterGitstafetteServer ¶
func RegisterGitstafetteServer(s *grpc.Server, srv GitstafetteServer)
Types ¶
type GRPCClientConfig ¶
type GRPCClientConfig struct { ClientID string RepositoryId string StreamWindow int WebhookHMAC string }
func CreateClientConfig ¶
func CreateClientConfig(clientId string, repositoryId string, streamWindow int, webhookHMAC string) *GRPCClientConfig
type GRPCServerConfig ¶
type GRPCServerConfig struct { Host string Port string StreamWindow int Insecure bool OAuthToken string TLSConfig *tls.Config }
func CreateServerConfig ¶
type GitstafetteClient ¶
type GitstafetteClient interface { FetchWebhookEvents(ctx context.Context, in *WebhookEventsRequest, opts ...grpc.CallOption) (Gitstafette_FetchWebhookEventsClient, error) WebhookEventPush(ctx context.Context, in *WebhookEventPushRequest, opts ...grpc.CallOption) (*WebhookEventPushResponse, error) WebhookEventStatus(ctx context.Context, in *WebhookEventStatusRequest, opts ...grpc.CallOption) (*WebhookEventStatusResponse, error) WebhookEventStatuses(ctx context.Context, in *WebhookEventStatusesRequest, opts ...grpc.CallOption) (Gitstafette_WebhookEventStatusesClient, error) }
GitstafetteClient is the client API for Gitstafette 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 NewGitstafetteClient ¶
func NewGitstafetteClient(cc grpc.ClientConnInterface) GitstafetteClient
type GitstafetteServer ¶
type GitstafetteServer interface { FetchWebhookEvents(*WebhookEventsRequest, Gitstafette_FetchWebhookEventsServer) error WebhookEventPush(context.Context, *WebhookEventPushRequest) (*WebhookEventPushResponse, error) WebhookEventStatus(context.Context, *WebhookEventStatusRequest) (*WebhookEventStatusResponse, error) WebhookEventStatuses(*WebhookEventStatusesRequest, Gitstafette_WebhookEventStatusesServer) error // contains filtered or unexported methods }
GitstafetteServer is the server API for Gitstafette service. All implementations must embed UnimplementedGitstafetteServer for forward compatibility
type Gitstafette_FetchWebhookEventsClient ¶
type Gitstafette_FetchWebhookEventsClient interface { Recv() (*WebhookEventsResponse, error) grpc.ClientStream }
type Gitstafette_FetchWebhookEventsServer ¶
type Gitstafette_FetchWebhookEventsServer interface { Send(*WebhookEventsResponse) error grpc.ServerStream }
type Gitstafette_WebhookEventStatusesClient ¶
type Gitstafette_WebhookEventStatusesClient interface { Recv() (*WebhookEventStatusResponse, error) grpc.ClientStream }
type Gitstafette_WebhookEventStatusesServer ¶
type Gitstafette_WebhookEventStatusesServer interface { Send(*WebhookEventStatusResponse) error grpc.ServerStream }
type Header ¶
type Header struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Values string `protobuf:"bytes,2,opt,name=values,proto3" json:"values,omitempty"` // contains filtered or unexported fields }
func (*Header) Descriptor
deprecated
func (*Header) ProtoMessage ¶
func (*Header) ProtoMessage()
func (*Header) ProtoReflect ¶
func (x *Header) ProtoReflect() protoreflect.Message
type RelayConfig ¶
type ServerConfig ¶
type UnimplementedGitstafetteServer ¶
type UnimplementedGitstafetteServer struct { }
UnimplementedGitstafetteServer must be embedded to have forward compatible implementations.
func (UnimplementedGitstafetteServer) FetchWebhookEvents ¶
func (UnimplementedGitstafetteServer) FetchWebhookEvents(*WebhookEventsRequest, Gitstafette_FetchWebhookEventsServer) error
func (UnimplementedGitstafetteServer) WebhookEventPush ¶
func (UnimplementedGitstafetteServer) WebhookEventPush(context.Context, *WebhookEventPushRequest) (*WebhookEventPushResponse, error)
func (UnimplementedGitstafetteServer) WebhookEventStatus ¶
func (UnimplementedGitstafetteServer) WebhookEventStatus(context.Context, *WebhookEventStatusRequest) (*WebhookEventStatusResponse, error)
func (UnimplementedGitstafetteServer) WebhookEventStatuses ¶
func (UnimplementedGitstafetteServer) WebhookEventStatuses(*WebhookEventStatusesRequest, Gitstafette_WebhookEventStatusesServer) error
type UnsafeGitstafetteServer ¶
type UnsafeGitstafetteServer interface {
// contains filtered or unexported methods
}
UnsafeGitstafetteServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GitstafetteServer will result in compilation errors.
type WebhookEvent ¶
type WebhookEvent struct { EventId string `protobuf:"bytes,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` Body []byte `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` Headers []*Header `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty"` // contains filtered or unexported fields }
func InternalToExternalEvent ¶
func InternalToExternalEvent(internalEvent *WebhookEventInternal) *WebhookEvent
func (*WebhookEvent) Descriptor
deprecated
func (*WebhookEvent) Descriptor() ([]byte, []int)
Deprecated: Use WebhookEvent.ProtoReflect.Descriptor instead.
func (*WebhookEvent) GetBody ¶
func (x *WebhookEvent) GetBody() []byte
func (*WebhookEvent) GetEventId ¶
func (x *WebhookEvent) GetEventId() string
func (*WebhookEvent) GetHeaders ¶
func (x *WebhookEvent) GetHeaders() []*Header
func (*WebhookEvent) ProtoMessage ¶
func (*WebhookEvent) ProtoMessage()
func (*WebhookEvent) ProtoReflect ¶
func (x *WebhookEvent) ProtoReflect() protoreflect.Message
func (*WebhookEvent) Reset ¶
func (x *WebhookEvent) Reset()
func (*WebhookEvent) String ¶
func (x *WebhookEvent) String() string
type WebhookEventHeader ¶
type WebhookEventInternal ¶
type WebhookEventInternal struct { ID string `json:"id"` IsRelayed bool `json:"isRelayed"` TimeRelayed time.Time `json:"relayedTime"` TimeReceived time.Time `json:"receivedTime"` Headers []WebhookEventHeader `json:"headers"` EventBody string `json:"eventBody"` }
func ExternalToInternalEvent ¶
func ExternalToInternalEvent(event *WebhookEvent) *WebhookEventInternal
type WebhookEventPushRequest ¶
type WebhookEventPushRequest struct { CliendId string `protobuf:"bytes,1,opt,name=cliend_id,json=cliendId,proto3" json:"cliend_id,omitempty"` RepositoryId string `protobuf:"bytes,2,opt,name=repository_id,json=repositoryId,proto3" json:"repository_id,omitempty"` WebhookEvent *WebhookEvent `protobuf:"bytes,3,opt,name=webhook_event,json=webhookEvent,proto3" json:"webhook_event,omitempty"` // contains filtered or unexported fields }
func (*WebhookEventPushRequest) Descriptor
deprecated
func (*WebhookEventPushRequest) Descriptor() ([]byte, []int)
Deprecated: Use WebhookEventPushRequest.ProtoReflect.Descriptor instead.
func (*WebhookEventPushRequest) GetCliendId ¶
func (x *WebhookEventPushRequest) GetCliendId() string
func (*WebhookEventPushRequest) GetRepositoryId ¶
func (x *WebhookEventPushRequest) GetRepositoryId() string
func (*WebhookEventPushRequest) GetWebhookEvent ¶
func (x *WebhookEventPushRequest) GetWebhookEvent() *WebhookEvent
func (*WebhookEventPushRequest) ProtoMessage ¶
func (*WebhookEventPushRequest) ProtoMessage()
func (*WebhookEventPushRequest) ProtoReflect ¶
func (x *WebhookEventPushRequest) ProtoReflect() protoreflect.Message
func (*WebhookEventPushRequest) Reset ¶
func (x *WebhookEventPushRequest) Reset()
func (*WebhookEventPushRequest) String ¶
func (x *WebhookEventPushRequest) String() string
type WebhookEventPushResponse ¶
type WebhookEventPushResponse struct { ResponseCode string `protobuf:"bytes,1,opt,name=response_code,json=responseCode,proto3" json:"response_code,omitempty"` ResponseDescription string `protobuf:"bytes,2,opt,name=response_description,json=responseDescription,proto3" json:"response_description,omitempty"` Accepted bool `protobuf:"varint,3,opt,name=accepted,proto3" json:"accepted,omitempty"` // contains filtered or unexported fields }
func (*WebhookEventPushResponse) Descriptor
deprecated
func (*WebhookEventPushResponse) Descriptor() ([]byte, []int)
Deprecated: Use WebhookEventPushResponse.ProtoReflect.Descriptor instead.
func (*WebhookEventPushResponse) GetAccepted ¶
func (x *WebhookEventPushResponse) GetAccepted() bool
func (*WebhookEventPushResponse) GetResponseCode ¶
func (x *WebhookEventPushResponse) GetResponseCode() string
func (*WebhookEventPushResponse) GetResponseDescription ¶
func (x *WebhookEventPushResponse) GetResponseDescription() string
func (*WebhookEventPushResponse) ProtoMessage ¶
func (*WebhookEventPushResponse) ProtoMessage()
func (*WebhookEventPushResponse) ProtoReflect ¶
func (x *WebhookEventPushResponse) ProtoReflect() protoreflect.Message
func (*WebhookEventPushResponse) Reset ¶
func (x *WebhookEventPushResponse) Reset()
func (*WebhookEventPushResponse) String ¶
func (x *WebhookEventPushResponse) String() string
type WebhookEventStatusRequest ¶
type WebhookEventStatusRequest struct { ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` RepositoryId string `protobuf:"bytes,2,opt,name=repository_id,json=repositoryId,proto3" json:"repository_id,omitempty"` // contains filtered or unexported fields }
func (*WebhookEventStatusRequest) Descriptor
deprecated
func (*WebhookEventStatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use WebhookEventStatusRequest.ProtoReflect.Descriptor instead.
func (*WebhookEventStatusRequest) GetClientId ¶
func (x *WebhookEventStatusRequest) GetClientId() string
func (*WebhookEventStatusRequest) GetRepositoryId ¶
func (x *WebhookEventStatusRequest) GetRepositoryId() string
func (*WebhookEventStatusRequest) ProtoMessage ¶
func (*WebhookEventStatusRequest) ProtoMessage()
func (*WebhookEventStatusRequest) ProtoReflect ¶
func (x *WebhookEventStatusRequest) ProtoReflect() protoreflect.Message
func (*WebhookEventStatusRequest) Reset ¶
func (x *WebhookEventStatusRequest) Reset()
func (*WebhookEventStatusRequest) String ¶
func (x *WebhookEventStatusRequest) String() string
type WebhookEventStatusResponse ¶
type WebhookEventStatusResponse struct { ServerId string `protobuf:"bytes,1,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"` Count uint32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` RepositoryId string `protobuf:"bytes,3,opt,name=repository_id,json=repositoryId,proto3" json:"repository_id,omitempty"` Status string `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*WebhookEventStatusResponse) Descriptor
deprecated
func (*WebhookEventStatusResponse) Descriptor() ([]byte, []int)
Deprecated: Use WebhookEventStatusResponse.ProtoReflect.Descriptor instead.
func (*WebhookEventStatusResponse) GetCount ¶
func (x *WebhookEventStatusResponse) GetCount() uint32
func (*WebhookEventStatusResponse) GetRepositoryId ¶
func (x *WebhookEventStatusResponse) GetRepositoryId() string
func (*WebhookEventStatusResponse) GetServerId ¶
func (x *WebhookEventStatusResponse) GetServerId() string
func (*WebhookEventStatusResponse) GetStatus ¶
func (x *WebhookEventStatusResponse) GetStatus() string
func (*WebhookEventStatusResponse) ProtoMessage ¶
func (*WebhookEventStatusResponse) ProtoMessage()
func (*WebhookEventStatusResponse) ProtoReflect ¶
func (x *WebhookEventStatusResponse) ProtoReflect() protoreflect.Message
func (*WebhookEventStatusResponse) Reset ¶
func (x *WebhookEventStatusResponse) Reset()
func (*WebhookEventStatusResponse) String ¶
func (x *WebhookEventStatusResponse) String() string
type WebhookEventStatusesRequest ¶
type WebhookEventStatusesRequest struct { ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` // contains filtered or unexported fields }
func (*WebhookEventStatusesRequest) Descriptor
deprecated
func (*WebhookEventStatusesRequest) Descriptor() ([]byte, []int)
Deprecated: Use WebhookEventStatusesRequest.ProtoReflect.Descriptor instead.
func (*WebhookEventStatusesRequest) GetClientId ¶
func (x *WebhookEventStatusesRequest) GetClientId() string
func (*WebhookEventStatusesRequest) ProtoMessage ¶
func (*WebhookEventStatusesRequest) ProtoMessage()
func (*WebhookEventStatusesRequest) ProtoReflect ¶
func (x *WebhookEventStatusesRequest) ProtoReflect() protoreflect.Message
func (*WebhookEventStatusesRequest) Reset ¶
func (x *WebhookEventStatusesRequest) Reset()
func (*WebhookEventStatusesRequest) String ¶
func (x *WebhookEventStatusesRequest) String() string
type WebhookEventsRequest ¶
type WebhookEventsRequest struct { ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` RepositoryId string `protobuf:"bytes,2,opt,name=repository_id,json=repositoryId,proto3" json:"repository_id,omitempty"` LastReceivedEventId uint64 `protobuf:"varint,3,opt,name=last_received_event_id,json=lastReceivedEventId,proto3" json:"last_received_event_id,omitempty"` DurationSecs uint32 `protobuf:"varint,4,opt,name=duration_secs,json=durationSecs,proto3" json:"duration_secs,omitempty"` // contains filtered or unexported fields }
func (*WebhookEventsRequest) Descriptor
deprecated
func (*WebhookEventsRequest) Descriptor() ([]byte, []int)
Deprecated: Use WebhookEventsRequest.ProtoReflect.Descriptor instead.
func (*WebhookEventsRequest) GetClientId ¶
func (x *WebhookEventsRequest) GetClientId() string
func (*WebhookEventsRequest) GetDurationSecs ¶
func (x *WebhookEventsRequest) GetDurationSecs() uint32
func (*WebhookEventsRequest) GetLastReceivedEventId ¶
func (x *WebhookEventsRequest) GetLastReceivedEventId() uint64
func (*WebhookEventsRequest) GetRepositoryId ¶
func (x *WebhookEventsRequest) GetRepositoryId() string
func (*WebhookEventsRequest) ProtoMessage ¶
func (*WebhookEventsRequest) ProtoMessage()
func (*WebhookEventsRequest) ProtoReflect ¶
func (x *WebhookEventsRequest) ProtoReflect() protoreflect.Message
func (*WebhookEventsRequest) Reset ¶
func (x *WebhookEventsRequest) Reset()
func (*WebhookEventsRequest) String ¶
func (x *WebhookEventsRequest) String() string
type WebhookEventsResponse ¶
type WebhookEventsResponse struct { WebhookEvents []*WebhookEvent `protobuf:"bytes,1,rep,name=webhook_events,json=webhookEvents,proto3" json:"webhook_events,omitempty"` // contains filtered or unexported fields }
func (*WebhookEventsResponse) Descriptor
deprecated
func (*WebhookEventsResponse) Descriptor() ([]byte, []int)
Deprecated: Use WebhookEventsResponse.ProtoReflect.Descriptor instead.
func (*WebhookEventsResponse) GetWebhookEvents ¶
func (x *WebhookEventsResponse) GetWebhookEvents() []*WebhookEvent
func (*WebhookEventsResponse) ProtoMessage ¶
func (*WebhookEventsResponse) ProtoMessage()
func (*WebhookEventsResponse) ProtoReflect ¶
func (x *WebhookEventsResponse) ProtoReflect() protoreflect.Message
func (*WebhookEventsResponse) Reset ¶
func (x *WebhookEventsResponse) Reset()
func (*WebhookEventsResponse) String ¶
func (x *WebhookEventsResponse) String() string