Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientForInstallation ¶
ClientForInstallation creates a go-github client for a specific app installation.
type GhCliSetup ¶
type GhCliSetup struct { Username string CliForInstall ClientForInstallation CliForApp *gh.Client }
GhCliSetup is the return value for `SetupGhCli`.
func SetupGhCli ¶
func SetupGhCli(ctx context.Context) (GhCliSetup, error)
SetupGhCli abstracts away the github app aspect and gives us a username to pay attention to and a way to get a GH client.
type HasInstallation ¶
type HasInstallation interface {
GetInstallation() *gh.Installation
}
HasInstallation covers all relevant webhook events
type RawKeyPair ¶
RawKeyPair can be written to disk.
type Webhook ¶
type Webhook struct {
// contains filtered or unexported fields
}
Webhook is the state we need to handle webhook events
func NewWebhook ¶
NewWebhook creates the state needed for a webhook
type WebhookHandler ¶
type WebhookHandler struct {
// contains filtered or unexported fields
}
WebhookHandler handles a specific event
type WebhookWorker ¶
type WebhookWorker struct {
// contains filtered or unexported fields
}
WebhookWorker pulls webhook events off the chan and gives them to a WebhookHandler
func NewWebhookWorker ¶
func NewWebhookWorker(k8s client.Client, makeGhcli ClientForInstallation, username string, log logr.Logger) WebhookWorker
NewWebhookWorker creates the state needed for a worker
func (*WebhookWorker) Worker ¶
func (webhook *WebhookWorker) Worker(wg *sync.WaitGroup, events <-chan interface{})
Worker handles github events from a channel