git

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commit added in v0.1.0

type Commit map[string]interface{}

Commit is a polled Commit, specific to each implementation.

type CommitPoller

type CommitPoller interface {
	Poll(repo string, ps pollingv1.PollStatus) (pollingv1.PollStatus, Commit, error)
}

CommitPoller implementations can check with an upstream Git hosting service to determine the current SHA and ETag.

type GitHubPoller

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

func NewGitHubPoller

func NewGitHubPoller(c *http.Client, endpoint, authToken string) *GitHubPoller

NewGitHubPoller creates and returns a new GitHub poller.

func (GitHubPoller) Poll

type GitLabPoller added in v0.0.2

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

func NewGitLabPoller added in v0.0.2

func NewGitLabPoller(c *http.Client, endpoint, authToken string) *GitLabPoller

NewGitLabPoller creates a new GitLab poller.

func (GitLabPoller) Poll added in v0.0.2

type MockPoller

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

MockPoller is a mock Git poller.

func NewMockPoller

func NewMockPoller() *MockPoller

NewMockPoller creates and returns a new mock Git poller.

func (*MockPoller) AddMockResponse

func (m *MockPoller) AddMockResponse(repo string, in pollingv1.PollStatus, c Commit, out pollingv1.PollStatus)

AddMockResponse sets up the response for a Poll call.

func (*MockPoller) FailWithError

func (m *MockPoller) FailWithError(err error)

FailWithError configures the poller to return errors.

func (*MockPoller) Poll

Poll is an implementation of the CommitPoller interface.

Jump to

Keyboard shortcuts

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