gitstafette_v1

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2025 License: CC0-1.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const DeliveryIdHeader = "X-Github-Delivery"

Variables

View Source
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

func CreateServerConfig(host string, port string, streamWindow int, insecure bool, oauthToken string, tlsConfig *tls.Config) *GRPCServerConfig

type GitstafetteClient

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.

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 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) Descriptor() ([]byte, []int)

Deprecated: Use Header.ProtoReflect.Descriptor instead.

func (*Header) GetName

func (x *Header) GetName() string

func (*Header) GetValues

func (x *Header) GetValues() string

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) ProtoReflect

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

func (*Header) Reset

func (x *Header) Reset()

func (*Header) String

func (x *Header) String() string

type RelayConfig

type RelayConfig struct {
	Enabled        bool
	Host           string
	Path           string
	Port           string
	Protocol       string
	Endpoint       *url.URL
	HealthEndpoint *url.URL
	Insecure       bool
}

func CreateRelayConfig

func CreateRelayConfig(relayEnabled bool, relayHost string, relayPath string, relayHealthCheckPath string, relayPort string, relayProtocol string, insecure bool) (*RelayConfig, error)

type ServerConfig

type ServerConfig struct {
	Name         string
	Host         string
	Port         string
	GrpcPort     string
	Repositories []string
}

type UnimplementedGitstafetteServer

type UnimplementedGitstafetteServer struct {
}

UnimplementedGitstafetteServer must be embedded to have forward compatible implementations.

func (UnimplementedGitstafetteServer) FetchWebhookEvents

func (UnimplementedGitstafetteServer) WebhookEventPush

func (UnimplementedGitstafetteServer) WebhookEventStatus

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 WebhookEventHeader struct {
	Key        string `json:"key"`
	FirstValue string `json:"firstValue"`
}

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 (*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 (*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 (*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

Jump to

Keyboard shortcuts

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