github

package
v0.0.0-...-e0e0b42 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GithubEventerType spec.EventerType = "GithubEventer"

GithubEventerType is an Eventer that uses Github Deployment Events as a backend.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsUnexpectedStatusCode

func IsUnexpectedStatusCode(err error) bool

IsUnexpectedStatusCode asserts unexpectedStatusCode.

Types

type Config

type Config struct {
	// Dependencies.
	HTTPClient httpspec.Client
	Logger     micrologger.Logger

	Environment  string
	OAuthToken   string
	Organisation string
	PollInterval time.Duration
	ProjectList  []string
	Provider     string
}

Config represents the configuration used to create a GitHub Eventer.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig provides a default configuration to create a new GitHub Eventer by best effort.

type GithubEventer

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

GithubEventer is an implementation of the Eventer interface, that uses GitHub Deployment Events as a backend.

func New

func New(config Config) (*GithubEventer, error)

New creates a new configured GitHub Eventer.

func (*GithubEventer) NewDeploymentEvents

func (e *GithubEventer) NewDeploymentEvents() (<-chan spec.DeploymentEvent, error)

func (*GithubEventer) SetFailed

func (e *GithubEventer) SetFailed(event spec.DeploymentEvent) error

func (*GithubEventer) SetPending

func (e *GithubEventer) SetPending(event spec.DeploymentEvent) error

func (*GithubEventer) SetSuccess

func (e *GithubEventer) SetSuccess(event spec.DeploymentEvent) error

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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