Documentation ¶
Overview ¶
Package github is a generated GoMock package.
Index ¶
- Variables
- type Handler
- type MockService
- func (m *MockService) Archive(ctx context.Context, repoSource, repoOwner, repoName string) error
- func (m *MockService) CreateJobForGithubPush(ctx context.Context, event githubapi.PushEvent) error
- func (m *MockService) EXPECT() *MockServiceMockRecorder
- func (m *MockService) HasValidSignature(ctx context.Context, body []byte, appIDHeader, signatureHeader string) (bool, error)
- func (m *MockService) IsAllowedInstallation(ctx context.Context, installationID int) (bool, []*contracts.Organization)
- func (m *MockService) PublishGithubEvent(ctx context.Context, event manifest.EstafetteGithubEvent) error
- func (m *MockService) Rename(ctx context.Context, ...) error
- func (m *MockService) Unarchive(ctx context.Context, repoSource, repoOwner, repoName string) error
- type MockServiceMockRecorder
- func (mr *MockServiceMockRecorder) Archive(ctx, repoSource, repoOwner, repoName interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) CreateJobForGithubPush(ctx, event interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) HasValidSignature(ctx, body, appIDHeader, signatureHeader interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) IsAllowedInstallation(ctx, installationID interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) PublishGithubEvent(ctx, event interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) Rename(...) *gomock.Call
- func (mr *MockServiceMockRecorder) Unarchive(ctx, repoSource, repoOwner, repoName interface{}) *gomock.Call
- type Service
Constants ¶
This section is empty.
Variables ¶
var ( ErrNonCloneableEvent = errors.New("The event is not cloneable") ErrNoManifest = errors.New("The repository has no manifest at the pushed commit") )
Functions ¶
This section is empty.
Types ¶
type MockService ¶
type MockService struct {
// contains filtered or unexported fields
}
MockService is a mock of Service interface.
func NewMockService ¶
func NewMockService(ctrl *gomock.Controller) *MockService
NewMockService creates a new mock instance.
func (*MockService) Archive ¶
func (m *MockService) Archive(ctx context.Context, repoSource, repoOwner, repoName string) error
Archive mocks base method.
func (*MockService) CreateJobForGithubPush ¶
CreateJobForGithubPush mocks base method.
func (*MockService) EXPECT ¶
func (m *MockService) EXPECT() *MockServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockService) HasValidSignature ¶
func (m *MockService) HasValidSignature(ctx context.Context, body []byte, appIDHeader, signatureHeader string) (bool, error)
HasValidSignature mocks base method.
func (*MockService) IsAllowedInstallation ¶
func (m *MockService) IsAllowedInstallation(ctx context.Context, installationID int) (bool, []*contracts.Organization)
IsAllowedInstallation mocks base method.
func (*MockService) PublishGithubEvent ¶
func (m *MockService) PublishGithubEvent(ctx context.Context, event manifest.EstafetteGithubEvent) error
PublishGithubEvent mocks base method.
type MockServiceMockRecorder ¶
type MockServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockServiceMockRecorder is the mock recorder for MockService.
func (*MockServiceMockRecorder) Archive ¶
func (mr *MockServiceMockRecorder) Archive(ctx, repoSource, repoOwner, repoName interface{}) *gomock.Call
Archive indicates an expected call of Archive.
func (*MockServiceMockRecorder) CreateJobForGithubPush ¶
func (mr *MockServiceMockRecorder) CreateJobForGithubPush(ctx, event interface{}) *gomock.Call
CreateJobForGithubPush indicates an expected call of CreateJobForGithubPush.
func (*MockServiceMockRecorder) HasValidSignature ¶
func (mr *MockServiceMockRecorder) HasValidSignature(ctx, body, appIDHeader, signatureHeader interface{}) *gomock.Call
HasValidSignature indicates an expected call of HasValidSignature.
func (*MockServiceMockRecorder) IsAllowedInstallation ¶
func (mr *MockServiceMockRecorder) IsAllowedInstallation(ctx, installationID interface{}) *gomock.Call
IsAllowedInstallation indicates an expected call of IsAllowedInstallation.
func (*MockServiceMockRecorder) PublishGithubEvent ¶
func (mr *MockServiceMockRecorder) PublishGithubEvent(ctx, event interface{}) *gomock.Call
PublishGithubEvent indicates an expected call of PublishGithubEvent.
func (*MockServiceMockRecorder) Rename ¶
func (mr *MockServiceMockRecorder) Rename(ctx, fromRepoSource, fromRepoOwner, fromRepoName, toRepoSource, toRepoOwner, toRepoName interface{}) *gomock.Call
Rename indicates an expected call of Rename.
func (*MockServiceMockRecorder) Unarchive ¶
func (mr *MockServiceMockRecorder) Unarchive(ctx, repoSource, repoOwner, repoName interface{}) *gomock.Call
Unarchive indicates an expected call of Unarchive.
type Service ¶
type Service interface { CreateJobForGithubPush(ctx context.Context, event githubapi.PushEvent) (err error) PublishGithubEvent(ctx context.Context, event manifest.EstafetteGithubEvent) (err error) HasValidSignature(ctx context.Context, body []byte, appIDHeader, signatureHeader string) (validSignature bool, err error) Rename(ctx context.Context, fromRepoSource, fromRepoOwner, fromRepoName, toRepoSource, toRepoOwner, toRepoName string) (err error) Archive(ctx context.Context, repoSource, repoOwner, repoName string) (err error) Unarchive(ctx context.Context, repoSource, repoOwner, repoName string) (err error) IsAllowedInstallation(ctx context.Context, installationID int) (isAllowed bool, organizations []*contracts.Organization) }
Service handles http events for Github integration
func NewLoggingService ¶
NewLoggingService returns a new instance of a logging Service.
func NewMetricsService ¶
func NewMetricsService(s Service, requestCount metrics.Counter, requestLatency metrics.Histogram) Service
NewMetricsService returns a new instance of a metrics Service.
func NewService ¶
func NewService(config *api.APIConfig, githubapiClient githubapi.Client, pubsubapiClient pubsubapi.Client, estafetteService estafette.Service, queueService queue.Service) Service
NewService returns a github.Service to handle incoming webhook events
func NewTracingService ¶
NewTracingService returns a new instance of a tracing Service.