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 a new GitHub poller.
func (GitHubPoller) Poll ¶
func (g GitHubPoller) Poll(repo string, pr pollingv1.PollStatus) (pollingv1.PollStatus, Commit, error)
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
func (g GitLabPoller) Poll(repo string, pr pollingv1.PollStatus) (pollingv1.PollStatus, Commit, error)
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 ¶
func (m *MockPoller) Poll(repo string, ps pollingv1.PollStatus) (pollingv1.PollStatus, Commit, error)
Poll is an implementation of the CommitPoller interface.
Click to show internal directories.
Click to hide internal directories.