github

package
v1.7.5 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 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 AppsAuthStrategy added in v1.5.6

type AppsAuthStrategy struct {
	AppID          int64
	InstallationID int64
	PrivateKey     string
	Transport      http.RoundTripper
}

func (*AppsAuthStrategy) AuthTransport added in v1.5.6

func (t *AppsAuthStrategy) AuthTransport() (http.RoundTripper, error)

AuthTransport implements the AuthStrategy interface.

type AuthStrategy added in v1.5.6

type AuthStrategy interface {
	// AuthTransport returns an http.RoundTripper that is used with an http.Client to make
	// authenticated requests using HTTP Basic Authentication.
	AuthTransport() (http.RoundTripper, error)
}

AuthStrategy is implemented by the different GitHub auth strategies that are supported

type EventListener

type EventListener struct {
	EventSourceName   string
	EventName         string
	GithubEventSource v1alpha1.GithubEventSource
	Metrics           *metrics.Metrics
}

EventListener implements Eventing for GitHub event source

func (*EventListener) GetEventName

func (el *EventListener) GetEventName() string

GetEventName returns name of event

func (*EventListener) GetEventSourceName

func (el *EventListener) GetEventSourceName() string

GetEventSourceName returns name of event source

func (*EventListener) GetEventSourceType

func (el *EventListener) GetEventSourceType() apicommon.EventSourceType

GetEventSourceType return type of event server

func (*EventListener) StartListening

func (el *EventListener) StartListening(ctx context.Context, dispatch func([]byte, ...eventsourcecommon.Option) error) error

StartListening starts an event source

func (*EventListener) ValidateEventSource

func (listener *EventListener) ValidateEventSource(ctx context.Context) 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 TokenAuthStrategy added in v1.5.6

type TokenAuthStrategy struct {
	Token     string
	Transport http.RoundTripper
}

func (*TokenAuthStrategy) AuthTransport added in v1.5.6

func (t *TokenAuthStrategy) AuthTransport() (http.RoundTripper, error)

AuthTransport implements the AuthStrategy interface.

func (*TokenAuthStrategy) RoundTrip added in v1.5.6

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

RoundTrip implements the RoundTripper interface.

Jump to

Keyboard shortcuts

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