Documentation ¶
Index ¶
- type MockBackend
- func (mock *MockBackend) FailHandler() pegomock.FailHandler
- func (mock *MockBackend) GetLock(project models.Project, workspace string) (*models.ProjectLock, error)
- func (mock *MockBackend) List() ([]models.ProjectLock, error)
- func (mock *MockBackend) SetFailHandler(fh pegomock.FailHandler)
- func (mock *MockBackend) TryLock(lock models.ProjectLock) (bool, models.ProjectLock, error)
- func (mock *MockBackend) Unlock(project models.Project, workspace string) (*models.ProjectLock, error)
- func (mock *MockBackend) UnlockByPull(repoFullName string, pullNum int) ([]models.ProjectLock, error)
- func (mock *MockBackend) VerifyWasCalled(invocationCountMatcher pegomock.Matcher) *VerifierMockBackend
- func (mock *MockBackend) VerifyWasCalledEventually(invocationCountMatcher pegomock.Matcher, timeout time.Duration) *VerifierMockBackend
- func (mock *MockBackend) VerifyWasCalledInOrder(invocationCountMatcher pegomock.Matcher, ...) *VerifierMockBackend
- func (mock *MockBackend) VerifyWasCalledOnce() *VerifierMockBackend
- type MockBackend_GetLock_OngoingVerification
- type MockBackend_List_OngoingVerification
- type MockBackend_TryLock_OngoingVerification
- type MockBackend_UnlockByPull_OngoingVerification
- type MockBackend_Unlock_OngoingVerification
- type MockLocker
- func (mock *MockLocker) FailHandler() pegomock.FailHandler
- func (mock *MockLocker) GetLock(key string) (*models.ProjectLock, error)
- func (mock *MockLocker) List() (map[string]models.ProjectLock, error)
- func (mock *MockLocker) SetFailHandler(fh pegomock.FailHandler)
- func (mock *MockLocker) TryLock(p models.Project, workspace string, pull models.PullRequest, user models.User) (locking.TryLockResponse, error)
- func (mock *MockLocker) Unlock(key string) (*models.ProjectLock, error)
- func (mock *MockLocker) UnlockByPull(repoFullName string, pullNum int) ([]models.ProjectLock, error)
- func (mock *MockLocker) VerifyWasCalled(invocationCountMatcher pegomock.Matcher) *VerifierMockLocker
- func (mock *MockLocker) VerifyWasCalledEventually(invocationCountMatcher pegomock.Matcher, timeout time.Duration) *VerifierMockLocker
- func (mock *MockLocker) VerifyWasCalledInOrder(invocationCountMatcher pegomock.Matcher, ...) *VerifierMockLocker
- func (mock *MockLocker) VerifyWasCalledOnce() *VerifierMockLocker
- type MockLocker_GetLock_OngoingVerification
- type MockLocker_List_OngoingVerification
- type MockLocker_TryLock_OngoingVerification
- type MockLocker_UnlockByPull_OngoingVerification
- type MockLocker_Unlock_OngoingVerification
- type VerifierMockBackend
- func (verifier *VerifierMockBackend) GetLock(project models.Project, workspace string) *MockBackend_GetLock_OngoingVerification
- func (verifier *VerifierMockBackend) List() *MockBackend_List_OngoingVerification
- func (verifier *VerifierMockBackend) TryLock(lock models.ProjectLock) *MockBackend_TryLock_OngoingVerification
- func (verifier *VerifierMockBackend) Unlock(project models.Project, workspace string) *MockBackend_Unlock_OngoingVerification
- func (verifier *VerifierMockBackend) UnlockByPull(repoFullName string, pullNum int) *MockBackend_UnlockByPull_OngoingVerification
- type VerifierMockLocker
- func (verifier *VerifierMockLocker) GetLock(key string) *MockLocker_GetLock_OngoingVerification
- func (verifier *VerifierMockLocker) List() *MockLocker_List_OngoingVerification
- func (verifier *VerifierMockLocker) TryLock(p models.Project, workspace string, pull models.PullRequest, user models.User) *MockLocker_TryLock_OngoingVerification
- func (verifier *VerifierMockLocker) Unlock(key string) *MockLocker_Unlock_OngoingVerification
- func (verifier *VerifierMockLocker) UnlockByPull(repoFullName string, pullNum int) *MockLocker_UnlockByPull_OngoingVerification
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockBackend ¶
type MockBackend struct {
// contains filtered or unexported fields
}
func NewMockBackend ¶
func NewMockBackend(options ...pegomock.Option) *MockBackend
func (*MockBackend) FailHandler ¶ added in v0.6.0
func (mock *MockBackend) FailHandler() pegomock.FailHandler
func (*MockBackend) GetLock ¶
func (mock *MockBackend) GetLock(project models.Project, workspace string) (*models.ProjectLock, error)
func (*MockBackend) List ¶
func (mock *MockBackend) List() ([]models.ProjectLock, error)
func (*MockBackend) SetFailHandler ¶ added in v0.6.0
func (mock *MockBackend) SetFailHandler(fh pegomock.FailHandler)
func (*MockBackend) TryLock ¶
func (mock *MockBackend) TryLock(lock models.ProjectLock) (bool, models.ProjectLock, error)
func (*MockBackend) Unlock ¶
func (mock *MockBackend) Unlock(project models.Project, workspace string) (*models.ProjectLock, error)
func (*MockBackend) UnlockByPull ¶
func (mock *MockBackend) UnlockByPull(repoFullName string, pullNum int) ([]models.ProjectLock, error)
func (*MockBackend) VerifyWasCalled ¶
func (mock *MockBackend) VerifyWasCalled(invocationCountMatcher pegomock.Matcher) *VerifierMockBackend
func (*MockBackend) VerifyWasCalledEventually ¶ added in v0.4.13
func (mock *MockBackend) VerifyWasCalledEventually(invocationCountMatcher pegomock.Matcher, timeout time.Duration) *VerifierMockBackend
func (*MockBackend) VerifyWasCalledInOrder ¶
func (mock *MockBackend) VerifyWasCalledInOrder(invocationCountMatcher pegomock.Matcher, inOrderContext *pegomock.InOrderContext) *VerifierMockBackend
func (*MockBackend) VerifyWasCalledOnce ¶
func (mock *MockBackend) VerifyWasCalledOnce() *VerifierMockBackend
type MockBackend_GetLock_OngoingVerification ¶ added in v0.8.3
type MockBackend_GetLock_OngoingVerification struct {
// contains filtered or unexported fields
}
func (*MockBackend_GetLock_OngoingVerification) GetAllCapturedArguments ¶ added in v0.8.3
func (c *MockBackend_GetLock_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Project, _param1 []string)
func (*MockBackend_GetLock_OngoingVerification) GetCapturedArguments ¶ added in v0.8.3
func (c *MockBackend_GetLock_OngoingVerification) GetCapturedArguments() (models.Project, string)
type MockBackend_List_OngoingVerification ¶ added in v0.8.3
type MockBackend_List_OngoingVerification struct {
// contains filtered or unexported fields
}
func (*MockBackend_List_OngoingVerification) GetAllCapturedArguments ¶ added in v0.8.3
func (c *MockBackend_List_OngoingVerification) GetAllCapturedArguments()
func (*MockBackend_List_OngoingVerification) GetCapturedArguments ¶ added in v0.8.3
func (c *MockBackend_List_OngoingVerification) GetCapturedArguments()
type MockBackend_TryLock_OngoingVerification ¶ added in v0.8.3
type MockBackend_TryLock_OngoingVerification struct {
// contains filtered or unexported fields
}
func (*MockBackend_TryLock_OngoingVerification) GetAllCapturedArguments ¶ added in v0.8.3
func (c *MockBackend_TryLock_OngoingVerification) GetAllCapturedArguments() (_param0 []models.ProjectLock)
func (*MockBackend_TryLock_OngoingVerification) GetCapturedArguments ¶ added in v0.8.3
func (c *MockBackend_TryLock_OngoingVerification) GetCapturedArguments() models.ProjectLock
type MockBackend_UnlockByPull_OngoingVerification ¶ added in v0.8.3
type MockBackend_UnlockByPull_OngoingVerification struct {
// contains filtered or unexported fields
}
func (*MockBackend_UnlockByPull_OngoingVerification) GetAllCapturedArguments ¶ added in v0.8.3
func (c *MockBackend_UnlockByPull_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 []int)
func (*MockBackend_UnlockByPull_OngoingVerification) GetCapturedArguments ¶ added in v0.8.3
func (c *MockBackend_UnlockByPull_OngoingVerification) GetCapturedArguments() (string, int)
type MockBackend_Unlock_OngoingVerification ¶ added in v0.8.3
type MockBackend_Unlock_OngoingVerification struct {
// contains filtered or unexported fields
}
func (*MockBackend_Unlock_OngoingVerification) GetAllCapturedArguments ¶ added in v0.8.3
func (c *MockBackend_Unlock_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Project, _param1 []string)
func (*MockBackend_Unlock_OngoingVerification) GetCapturedArguments ¶ added in v0.8.3
func (c *MockBackend_Unlock_OngoingVerification) GetCapturedArguments() (models.Project, string)
type MockLocker ¶
type MockLocker struct {
// contains filtered or unexported fields
}
func NewMockLocker ¶
func NewMockLocker(options ...pegomock.Option) *MockLocker
func (*MockLocker) FailHandler ¶ added in v0.6.0
func (mock *MockLocker) FailHandler() pegomock.FailHandler
func (*MockLocker) GetLock ¶
func (mock *MockLocker) GetLock(key string) (*models.ProjectLock, error)
func (*MockLocker) List ¶
func (mock *MockLocker) List() (map[string]models.ProjectLock, error)
func (*MockLocker) SetFailHandler ¶ added in v0.6.0
func (mock *MockLocker) SetFailHandler(fh pegomock.FailHandler)
func (*MockLocker) TryLock ¶
func (mock *MockLocker) TryLock(p models.Project, workspace string, pull models.PullRequest, user models.User) (locking.TryLockResponse, error)
func (*MockLocker) Unlock ¶
func (mock *MockLocker) Unlock(key string) (*models.ProjectLock, error)
func (*MockLocker) UnlockByPull ¶
func (mock *MockLocker) UnlockByPull(repoFullName string, pullNum int) ([]models.ProjectLock, error)
func (*MockLocker) VerifyWasCalled ¶
func (mock *MockLocker) VerifyWasCalled(invocationCountMatcher pegomock.Matcher) *VerifierMockLocker
func (*MockLocker) VerifyWasCalledEventually ¶ added in v0.4.13
func (mock *MockLocker) VerifyWasCalledEventually(invocationCountMatcher pegomock.Matcher, timeout time.Duration) *VerifierMockLocker
func (*MockLocker) VerifyWasCalledInOrder ¶
func (mock *MockLocker) VerifyWasCalledInOrder(invocationCountMatcher pegomock.Matcher, inOrderContext *pegomock.InOrderContext) *VerifierMockLocker
func (*MockLocker) VerifyWasCalledOnce ¶
func (mock *MockLocker) VerifyWasCalledOnce() *VerifierMockLocker
type MockLocker_GetLock_OngoingVerification ¶ added in v0.8.3
type MockLocker_GetLock_OngoingVerification struct {
// contains filtered or unexported fields
}
func (*MockLocker_GetLock_OngoingVerification) GetAllCapturedArguments ¶ added in v0.8.3
func (c *MockLocker_GetLock_OngoingVerification) GetAllCapturedArguments() (_param0 []string)
func (*MockLocker_GetLock_OngoingVerification) GetCapturedArguments ¶ added in v0.8.3
func (c *MockLocker_GetLock_OngoingVerification) GetCapturedArguments() string
type MockLocker_List_OngoingVerification ¶ added in v0.8.3
type MockLocker_List_OngoingVerification struct {
// contains filtered or unexported fields
}
func (*MockLocker_List_OngoingVerification) GetAllCapturedArguments ¶ added in v0.8.3
func (c *MockLocker_List_OngoingVerification) GetAllCapturedArguments()
func (*MockLocker_List_OngoingVerification) GetCapturedArguments ¶ added in v0.8.3
func (c *MockLocker_List_OngoingVerification) GetCapturedArguments()
type MockLocker_TryLock_OngoingVerification ¶ added in v0.8.3
type MockLocker_TryLock_OngoingVerification struct {
// contains filtered or unexported fields
}
func (*MockLocker_TryLock_OngoingVerification) GetAllCapturedArguments ¶ added in v0.8.3
func (c *MockLocker_TryLock_OngoingVerification) GetAllCapturedArguments() (_param0 []models.Project, _param1 []string, _param2 []models.PullRequest, _param3 []models.User)
func (*MockLocker_TryLock_OngoingVerification) GetCapturedArguments ¶ added in v0.8.3
func (c *MockLocker_TryLock_OngoingVerification) GetCapturedArguments() (models.Project, string, models.PullRequest, models.User)
type MockLocker_UnlockByPull_OngoingVerification ¶ added in v0.8.3
type MockLocker_UnlockByPull_OngoingVerification struct {
// contains filtered or unexported fields
}
func (*MockLocker_UnlockByPull_OngoingVerification) GetAllCapturedArguments ¶ added in v0.8.3
func (c *MockLocker_UnlockByPull_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 []int)
func (*MockLocker_UnlockByPull_OngoingVerification) GetCapturedArguments ¶ added in v0.8.3
func (c *MockLocker_UnlockByPull_OngoingVerification) GetCapturedArguments() (string, int)
type MockLocker_Unlock_OngoingVerification ¶ added in v0.8.3
type MockLocker_Unlock_OngoingVerification struct {
// contains filtered or unexported fields
}
func (*MockLocker_Unlock_OngoingVerification) GetAllCapturedArguments ¶ added in v0.8.3
func (c *MockLocker_Unlock_OngoingVerification) GetAllCapturedArguments() (_param0 []string)
func (*MockLocker_Unlock_OngoingVerification) GetCapturedArguments ¶ added in v0.8.3
func (c *MockLocker_Unlock_OngoingVerification) GetCapturedArguments() string
type VerifierMockBackend ¶ added in v0.8.3
type VerifierMockBackend struct {
// contains filtered or unexported fields
}
func (*VerifierMockBackend) GetLock ¶ added in v0.8.3
func (verifier *VerifierMockBackend) GetLock(project models.Project, workspace string) *MockBackend_GetLock_OngoingVerification
func (*VerifierMockBackend) List ¶ added in v0.8.3
func (verifier *VerifierMockBackend) List() *MockBackend_List_OngoingVerification
func (*VerifierMockBackend) TryLock ¶ added in v0.8.3
func (verifier *VerifierMockBackend) TryLock(lock models.ProjectLock) *MockBackend_TryLock_OngoingVerification
func (*VerifierMockBackend) Unlock ¶ added in v0.8.3
func (verifier *VerifierMockBackend) Unlock(project models.Project, workspace string) *MockBackend_Unlock_OngoingVerification
func (*VerifierMockBackend) UnlockByPull ¶ added in v0.8.3
func (verifier *VerifierMockBackend) UnlockByPull(repoFullName string, pullNum int) *MockBackend_UnlockByPull_OngoingVerification
type VerifierMockLocker ¶ added in v0.8.3
type VerifierMockLocker struct {
// contains filtered or unexported fields
}
func (*VerifierMockLocker) GetLock ¶ added in v0.8.3
func (verifier *VerifierMockLocker) GetLock(key string) *MockLocker_GetLock_OngoingVerification
func (*VerifierMockLocker) List ¶ added in v0.8.3
func (verifier *VerifierMockLocker) List() *MockLocker_List_OngoingVerification
func (*VerifierMockLocker) TryLock ¶ added in v0.8.3
func (verifier *VerifierMockLocker) TryLock(p models.Project, workspace string, pull models.PullRequest, user models.User) *MockLocker_TryLock_OngoingVerification
func (*VerifierMockLocker) Unlock ¶ added in v0.8.3
func (verifier *VerifierMockLocker) Unlock(key string) *MockLocker_Unlock_OngoingVerification
func (*VerifierMockLocker) UnlockByPull ¶ added in v0.8.3
func (verifier *VerifierMockLocker) UnlockByPull(repoFullName string, pullNum int) *MockLocker_UnlockByPull_OngoingVerification
Click to show internal directories.
Click to hide internal directories.