github

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventListener

type EventListener struct {
	// Logger to log stuff
	Logger *logrus.Logger
	// K8sClient is the Kubernetes client
	K8sClient kubernetes.Interface
	// Namespace where gateway is deployed
	Namespace string
}

EventListener implements Eventing for GitHub event source

func (*EventListener) StartEventSource

func (listener *EventListener) StartEventSource(eventSource *gateways.EventSource, eventStream gateways.Eventing_StartEventSourceServer) error

StartEventSource starts an event source

func (*EventListener) ValidateEventSource

func (listener *EventListener) ValidateEventSource(ctx context.Context, eventSource *gateways.EventSource) (*gateways.ValidEventSource, error)

ValidateEventSource validates a github event source

type Router

type Router struct {
	// contains filtered or unexported fields
}

Router contains information about the route

func (*Router) GetRoute

func (router *Router) GetRoute() *webhook.Route

GetRoute returns the route

func (*Router) HandleRoute

func (router *Router) HandleRoute(writer http.ResponseWriter, request *http.Request)

HandleRoute handles incoming requests on the route

func (*Router) PostActivate

func (router *Router) PostActivate() error

PostActivate performs operations once the route is activated and ready to consume requests

func (*Router) PostInactivate

func (router *Router) PostInactivate() error

PostInactivate performs operations after the route is inactivated

type TokenAuthTransport

type TokenAuthTransport struct {
	Token     string
	Transport http.RoundTripper
}

func (*TokenAuthTransport) Client

func (t *TokenAuthTransport) Client() *http.Client

Client returns an *http.Client that makes requests that are authenticated using HTTP Basic Authentication.

func (*TokenAuthTransport) RoundTrip

func (t *TokenAuthTransport) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip implements the RoundTripper interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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