Documentation ¶
Overview ¶
Package bitbucket is a generated GoMock package.
Index ¶
- Variables
- type Descriptor
- type DescriptorAuthentication
- type DescriptorLifecycle
- type DescriptorModules
- type DescriptorVendor
- type DescriptorWebhook
- type Handler
- type MockService
- func (m *MockService) Archive(ctx context.Context, repoSource, repoOwner, repoName string) error
- func (m *MockService) CreateJobForBitbucketPush(ctx context.Context, installation bitbucketapi.BitbucketAppInstallation, ...) error
- func (m *MockService) EXPECT() *MockServiceMockRecorder
- func (m *MockService) IsAllowedOwner(ctx context.Context, repository *bitbucketapi.Repository) (bool, []*contracts.Organization)
- func (m *MockService) PublishBitbucketEvent(ctx context.Context, event manifest.EstafetteBitbucketEvent) 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) CreateJobForBitbucketPush(ctx, installation, event interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) IsAllowedOwner(ctx, repository interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) PublishBitbucketEvent(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 Descriptor ¶ added in v1.0.1
type Descriptor struct { Key string `json:"key,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Vendor DescriptorVendor `json:"vendor,omitempty"` BaseURL string `json:"baseUrl,omitempty"` Authentication *DescriptorAuthentication `json:"authentication,omitempty"` Lifecycle *DescriptorLifecycle `json:"lifecycle,omitempty"` Scopes []string `json:"scopes,omitempty"` Contexts []string `json:"contexts,omitempty"` Modules *DescriptorModules `json:"modules,omitempty"` }
type DescriptorAuthentication ¶ added in v1.0.1
type DescriptorAuthentication struct {
Type string `json:"type,omitempty"`
}
type DescriptorLifecycle ¶ added in v1.0.1
type DescriptorModules ¶ added in v1.0.1
type DescriptorModules struct {
Webhooks []DescriptorWebhook `json:"webhooks,omitempty"`
}
type DescriptorVendor ¶ added in v1.0.1
type DescriptorWebhook ¶ added in v1.0.1
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) Descriptor ¶ added in v1.0.1
func (*Handler) Uninstalled ¶ added in v1.0.1
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) CreateJobForBitbucketPush ¶
func (m *MockService) CreateJobForBitbucketPush(ctx context.Context, installation bitbucketapi.BitbucketAppInstallation, event bitbucketapi.RepositoryPushEvent) error
CreateJobForBitbucketPush 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) IsAllowedOwner ¶
func (m *MockService) IsAllowedOwner(ctx context.Context, repository *bitbucketapi.Repository) (bool, []*contracts.Organization)
IsAllowedOwner mocks base method
func (*MockService) PublishBitbucketEvent ¶
func (m *MockService) PublishBitbucketEvent(ctx context.Context, event manifest.EstafetteBitbucketEvent) error
PublishBitbucketEvent 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) CreateJobForBitbucketPush ¶
func (mr *MockServiceMockRecorder) CreateJobForBitbucketPush(ctx, installation, event interface{}) *gomock.Call
CreateJobForBitbucketPush indicates an expected call of CreateJobForBitbucketPush
func (*MockServiceMockRecorder) IsAllowedOwner ¶
func (mr *MockServiceMockRecorder) IsAllowedOwner(ctx, repository interface{}) *gomock.Call
IsAllowedOwner indicates an expected call of IsAllowedOwner
func (*MockServiceMockRecorder) PublishBitbucketEvent ¶
func (mr *MockServiceMockRecorder) PublishBitbucketEvent(ctx, event interface{}) *gomock.Call
PublishBitbucketEvent indicates an expected call of PublishBitbucketEvent
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 { CreateJobForBitbucketPush(ctx context.Context, installation bitbucketapi.BitbucketAppInstallation, event bitbucketapi.RepositoryPushEvent) (err error) PublishBitbucketEvent(ctx context.Context, event manifest.EstafetteBitbucketEvent) (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) IsAllowedOwner(ctx context.Context, repository *bitbucketapi.Repository) (isAllowed bool, organizations []*contracts.Organization) }
Service handles http events for Bitbucket 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, bitbucketapiClient bitbucketapi.Client, pubsubapiClient pubsubapi.Client, estafetteService estafette.Service, queueService queue.Service) Service
NewService returns a new bitbucket.Service
func NewTracingService ¶
NewTracingService returns a new instance of a tracing Service.