webhooks

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 19, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenericEvent

type GenericEvent struct {
	Installation *github.Installation `json:"installation,omitempty"`
}

GenericEvent contains just enough inforamation about webhook to handle authentication

type Server

type Server struct {
	Port            int
	WebhookSecret   string
	PrivateKeyFile  string
	AppID           int
	GitHubAppClient *github.Client

	Queue workqueue.RateLimitingInterface
	// contains filtered or unexported fields
}

Server contains the logic to process webhooks, kinda like probot

func (*Server) Run

func (s *Server) Run(stopCh <-chan struct{}, shutdownCh chan struct{}) error

Run starts a http server on the configured port

type Webhook

type Webhook struct {
	Event     interface{}
	Github    *github.Client
	AppID     *int
	AppGitHub *github.Client
	Queue     workqueue.RateLimitingInterface
}

Webhook contains an event payload, metadata, and clients

func (*Webhook) Process

func (w *Webhook) Process() bool

Process handles webhook events kinda like Probot does

func (*Webhook) SyncInstallation

func (w *Webhook) SyncInstallation(re *github.InstallationRepositoriesEvent) error

SyncInstallation queues up work for installations

Jump to

Keyboard shortcuts

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