Documentation
¶
Index ¶
- func NormalizeURL(rawURL string) string
- type CommandRunner
- type CommitInfo
- type MockCommandRunner
- type MockCommandRunner_Expecter
- type MockCommandRunner_RunWithTTY_Call
- func (_c *MockCommandRunner_RunWithTTY_Call) Return(_a0 string, _a1 error) *MockCommandRunner_RunWithTTY_Call
- func (_c *MockCommandRunner_RunWithTTY_Call) Run(run func(ctx context.Context, name string, args ...string)) *MockCommandRunner_RunWithTTY_Call
- func (_c *MockCommandRunner_RunWithTTY_Call) RunAndReturn(run func(context.Context, string, ...string) (string, error)) *MockCommandRunner_RunWithTTY_Call
- type MockCommandRunner_Run_Call
- func (_c *MockCommandRunner_Run_Call) Return(_a0 string, _a1 error) *MockCommandRunner_Run_Call
- func (_c *MockCommandRunner_Run_Call) Run(run func(ctx context.Context, name string, args ...string)) *MockCommandRunner_Run_Call
- func (_c *MockCommandRunner_Run_Call) RunAndReturn(run func(context.Context, string, ...string) (string, error)) *MockCommandRunner_Run_Call
- type MockService
- func (_m *MockService) Clone(ctx context.Context, url string, branch string) error
- func (_m *MockService) EXPECT() *MockService_Expecter
- func (_m *MockService) GetInfo(ctx context.Context) (*CommitInfo, error)
- func (_m *MockService) GetRemote(ctx context.Context) (string, error)
- func (_m *MockService) GetTopLevel(ctx context.Context) (string, error)
- func (_m *MockService) Pull(ctx context.Context) error
- func (_m *MockService) SetLocalExclude(patterns []string) error
- func (_m *MockService) Sync(ctx context.Context, url string, branch string, sparseCheckout []string) error
- type MockService_Clone_Call
- func (_c *MockService_Clone_Call) Return(_a0 error) *MockService_Clone_Call
- func (_c *MockService_Clone_Call) Run(run func(ctx context.Context, url string, branch string)) *MockService_Clone_Call
- func (_c *MockService_Clone_Call) RunAndReturn(run func(context.Context, string, string) error) *MockService_Clone_Call
- type MockService_Expecter
- func (_e *MockService_Expecter) Clone(ctx interface{}, url interface{}, branch interface{}) *MockService_Clone_Call
- func (_e *MockService_Expecter) GetInfo(ctx interface{}) *MockService_GetInfo_Call
- func (_e *MockService_Expecter) GetRemote(ctx interface{}) *MockService_GetRemote_Call
- func (_e *MockService_Expecter) GetTopLevel(ctx interface{}) *MockService_GetTopLevel_Call
- func (_e *MockService_Expecter) Pull(ctx interface{}) *MockService_Pull_Call
- func (_e *MockService_Expecter) SetLocalExclude(patterns interface{}) *MockService_SetLocalExclude_Call
- func (_e *MockService_Expecter) Sync(ctx interface{}, url interface{}, branch interface{}, ...) *MockService_Sync_Call
- type MockService_GetInfo_Call
- func (_c *MockService_GetInfo_Call) Return(_a0 *CommitInfo, _a1 error) *MockService_GetInfo_Call
- func (_c *MockService_GetInfo_Call) Run(run func(ctx context.Context)) *MockService_GetInfo_Call
- func (_c *MockService_GetInfo_Call) RunAndReturn(run func(context.Context) (*CommitInfo, error)) *MockService_GetInfo_Call
- type MockService_GetRemote_Call
- func (_c *MockService_GetRemote_Call) Return(_a0 string, _a1 error) *MockService_GetRemote_Call
- func (_c *MockService_GetRemote_Call) Run(run func(ctx context.Context)) *MockService_GetRemote_Call
- func (_c *MockService_GetRemote_Call) RunAndReturn(run func(context.Context) (string, error)) *MockService_GetRemote_Call
- type MockService_GetTopLevel_Call
- func (_c *MockService_GetTopLevel_Call) Return(_a0 string, _a1 error) *MockService_GetTopLevel_Call
- func (_c *MockService_GetTopLevel_Call) Run(run func(ctx context.Context)) *MockService_GetTopLevel_Call
- func (_c *MockService_GetTopLevel_Call) RunAndReturn(run func(context.Context) (string, error)) *MockService_GetTopLevel_Call
- type MockService_Pull_Call
- type MockService_SetLocalExclude_Call
- func (_c *MockService_SetLocalExclude_Call) Return(_a0 error) *MockService_SetLocalExclude_Call
- func (_c *MockService_SetLocalExclude_Call) Run(run func(patterns []string)) *MockService_SetLocalExclude_Call
- func (_c *MockService_SetLocalExclude_Call) RunAndReturn(run func([]string) error) *MockService_SetLocalExclude_Call
- type MockService_Sync_Call
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NormalizeURL ¶ added in v0.1.22
NormalizeURL parses and normalizes a git URL for comparison. Returns the normalized form (host/owner/repo) regardless of protocol (HTTPS, SSH, etc).
Types ¶
type CommandRunner ¶ added in v0.1.22
type CommandRunner interface {
Run(ctx context.Context, name string, args ...string) (string, error)
RunWithTTY(ctx context.Context, name string, args ...string) (string, error)
}
CommandRunner executes shell commands.
type CommitInfo ¶ added in v0.1.6
type MockCommandRunner ¶ added in v0.1.22
MockCommandRunner is an autogenerated mock type for the CommandRunner type
func NewMockCommandRunner ¶ added in v0.1.22
func NewMockCommandRunner(t interface {
mock.TestingT
Cleanup(func())
}) *MockCommandRunner
NewMockCommandRunner creates a new instance of MockCommandRunner. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockCommandRunner) EXPECT ¶ added in v0.1.22
func (_m *MockCommandRunner) EXPECT() *MockCommandRunner_Expecter
func (*MockCommandRunner) Run ¶ added in v0.1.22
Run provides a mock function with given fields: ctx, name, args
func (*MockCommandRunner) RunWithTTY ¶ added in v0.1.22
func (_m *MockCommandRunner) RunWithTTY(ctx context.Context, name string, args ...string) (string, error)
RunWithTTY provides a mock function with given fields: ctx, name, args
type MockCommandRunner_Expecter ¶ added in v0.1.22
type MockCommandRunner_Expecter struct {
// contains filtered or unexported fields
}
func (*MockCommandRunner_Expecter) Run ¶ added in v0.1.22
func (_e *MockCommandRunner_Expecter) Run(ctx interface{}, name interface{}, args ...interface{}) *MockCommandRunner_Run_Call
Run is a helper method to define mock.On call
- ctx context.Context
- name string
- args ...string
func (*MockCommandRunner_Expecter) RunWithTTY ¶ added in v0.1.22
func (_e *MockCommandRunner_Expecter) RunWithTTY(ctx interface{}, name interface{}, args ...interface{}) *MockCommandRunner_RunWithTTY_Call
RunWithTTY is a helper method to define mock.On call
- ctx context.Context
- name string
- args ...string
type MockCommandRunner_RunWithTTY_Call ¶ added in v0.1.22
MockCommandRunner_RunWithTTY_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RunWithTTY'
func (*MockCommandRunner_RunWithTTY_Call) Return ¶ added in v0.1.22
func (_c *MockCommandRunner_RunWithTTY_Call) Return(_a0 string, _a1 error) *MockCommandRunner_RunWithTTY_Call
func (*MockCommandRunner_RunWithTTY_Call) Run ¶ added in v0.1.22
func (_c *MockCommandRunner_RunWithTTY_Call) Run(run func(ctx context.Context, name string, args ...string)) *MockCommandRunner_RunWithTTY_Call
func (*MockCommandRunner_RunWithTTY_Call) RunAndReturn ¶ added in v0.1.22
func (_c *MockCommandRunner_RunWithTTY_Call) RunAndReturn(run func(context.Context, string, ...string) (string, error)) *MockCommandRunner_RunWithTTY_Call
type MockCommandRunner_Run_Call ¶ added in v0.1.22
MockCommandRunner_Run_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Run'
func (*MockCommandRunner_Run_Call) Return ¶ added in v0.1.22
func (_c *MockCommandRunner_Run_Call) Return(_a0 string, _a1 error) *MockCommandRunner_Run_Call
func (*MockCommandRunner_Run_Call) Run ¶ added in v0.1.22
func (_c *MockCommandRunner_Run_Call) Run(run func(ctx context.Context, name string, args ...string)) *MockCommandRunner_Run_Call
func (*MockCommandRunner_Run_Call) RunAndReturn ¶ added in v0.1.22
func (_c *MockCommandRunner_Run_Call) RunAndReturn(run func(context.Context, string, ...string) (string, error)) *MockCommandRunner_Run_Call
type MockService ¶ added in v0.1.22
MockService is an autogenerated mock type for the Service type
func NewMockService ¶ added in v0.1.22
func NewMockService(t interface {
mock.TestingT
Cleanup(func())
}) *MockService
NewMockService creates a new instance of MockService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockService) Clone ¶ added in v0.1.22
Clone provides a mock function with given fields: ctx, url, branch
func (*MockService) EXPECT ¶ added in v0.1.22
func (_m *MockService) EXPECT() *MockService_Expecter
func (*MockService) GetInfo ¶ added in v0.1.22
func (_m *MockService) GetInfo(ctx context.Context) (*CommitInfo, error)
GetInfo provides a mock function with given fields: ctx
func (*MockService) GetRemote ¶ added in v0.1.22
func (_m *MockService) GetRemote(ctx context.Context) (string, error)
GetRemote provides a mock function with given fields: ctx
func (*MockService) GetTopLevel ¶ added in v0.1.22
func (_m *MockService) GetTopLevel(ctx context.Context) (string, error)
GetTopLevel provides a mock function with given fields: ctx
func (*MockService) Pull ¶ added in v0.1.22
func (_m *MockService) Pull(ctx context.Context) error
Pull provides a mock function with given fields: ctx
func (*MockService) SetLocalExclude ¶ added in v0.1.22
func (_m *MockService) SetLocalExclude(patterns []string) error
SetLocalExclude provides a mock function with given fields: patterns
type MockService_Clone_Call ¶ added in v0.1.22
MockService_Clone_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Clone'
func (*MockService_Clone_Call) Return ¶ added in v0.1.22
func (_c *MockService_Clone_Call) Return(_a0 error) *MockService_Clone_Call
func (*MockService_Clone_Call) Run ¶ added in v0.1.22
func (_c *MockService_Clone_Call) Run(run func(ctx context.Context, url string, branch string)) *MockService_Clone_Call
func (*MockService_Clone_Call) RunAndReturn ¶ added in v0.1.22
func (_c *MockService_Clone_Call) RunAndReturn(run func(context.Context, string, string) error) *MockService_Clone_Call
type MockService_Expecter ¶ added in v0.1.22
type MockService_Expecter struct {
// contains filtered or unexported fields
}
func (*MockService_Expecter) Clone ¶ added in v0.1.22
func (_e *MockService_Expecter) Clone(ctx interface{}, url interface{}, branch interface{}) *MockService_Clone_Call
Clone is a helper method to define mock.On call
- ctx context.Context
- url string
- branch string
func (*MockService_Expecter) GetInfo ¶ added in v0.1.22
func (_e *MockService_Expecter) GetInfo(ctx interface{}) *MockService_GetInfo_Call
GetInfo is a helper method to define mock.On call
- ctx context.Context
func (*MockService_Expecter) GetRemote ¶ added in v0.1.22
func (_e *MockService_Expecter) GetRemote(ctx interface{}) *MockService_GetRemote_Call
GetRemote is a helper method to define mock.On call
- ctx context.Context
func (*MockService_Expecter) GetTopLevel ¶ added in v0.1.22
func (_e *MockService_Expecter) GetTopLevel(ctx interface{}) *MockService_GetTopLevel_Call
GetTopLevel is a helper method to define mock.On call
- ctx context.Context
func (*MockService_Expecter) Pull ¶ added in v0.1.22
func (_e *MockService_Expecter) Pull(ctx interface{}) *MockService_Pull_Call
Pull is a helper method to define mock.On call
- ctx context.Context
func (*MockService_Expecter) SetLocalExclude ¶ added in v0.1.22
func (_e *MockService_Expecter) SetLocalExclude(patterns interface{}) *MockService_SetLocalExclude_Call
SetLocalExclude is a helper method to define mock.On call
- patterns []string
func (*MockService_Expecter) Sync ¶ added in v0.1.22
func (_e *MockService_Expecter) Sync(ctx interface{}, url interface{}, branch interface{}, sparseCheckout interface{}) *MockService_Sync_Call
Sync is a helper method to define mock.On call
- ctx context.Context
- url string
- branch string
- sparseCheckout []string
type MockService_GetInfo_Call ¶ added in v0.1.22
MockService_GetInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetInfo'
func (*MockService_GetInfo_Call) Return ¶ added in v0.1.22
func (_c *MockService_GetInfo_Call) Return(_a0 *CommitInfo, _a1 error) *MockService_GetInfo_Call
func (*MockService_GetInfo_Call) Run ¶ added in v0.1.22
func (_c *MockService_GetInfo_Call) Run(run func(ctx context.Context)) *MockService_GetInfo_Call
func (*MockService_GetInfo_Call) RunAndReturn ¶ added in v0.1.22
func (_c *MockService_GetInfo_Call) RunAndReturn(run func(context.Context) (*CommitInfo, error)) *MockService_GetInfo_Call
type MockService_GetRemote_Call ¶ added in v0.1.22
MockService_GetRemote_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRemote'
func (*MockService_GetRemote_Call) Return ¶ added in v0.1.22
func (_c *MockService_GetRemote_Call) Return(_a0 string, _a1 error) *MockService_GetRemote_Call
func (*MockService_GetRemote_Call) Run ¶ added in v0.1.22
func (_c *MockService_GetRemote_Call) Run(run func(ctx context.Context)) *MockService_GetRemote_Call
func (*MockService_GetRemote_Call) RunAndReturn ¶ added in v0.1.22
func (_c *MockService_GetRemote_Call) RunAndReturn(run func(context.Context) (string, error)) *MockService_GetRemote_Call
type MockService_GetTopLevel_Call ¶ added in v0.1.22
MockService_GetTopLevel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTopLevel'
func (*MockService_GetTopLevel_Call) Return ¶ added in v0.1.22
func (_c *MockService_GetTopLevel_Call) Return(_a0 string, _a1 error) *MockService_GetTopLevel_Call
func (*MockService_GetTopLevel_Call) Run ¶ added in v0.1.22
func (_c *MockService_GetTopLevel_Call) Run(run func(ctx context.Context)) *MockService_GetTopLevel_Call
func (*MockService_GetTopLevel_Call) RunAndReturn ¶ added in v0.1.22
func (_c *MockService_GetTopLevel_Call) RunAndReturn(run func(context.Context) (string, error)) *MockService_GetTopLevel_Call
type MockService_Pull_Call ¶ added in v0.1.22
MockService_Pull_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Pull'
func (*MockService_Pull_Call) Return ¶ added in v0.1.22
func (_c *MockService_Pull_Call) Return(_a0 error) *MockService_Pull_Call
func (*MockService_Pull_Call) Run ¶ added in v0.1.22
func (_c *MockService_Pull_Call) Run(run func(ctx context.Context)) *MockService_Pull_Call
func (*MockService_Pull_Call) RunAndReturn ¶ added in v0.1.22
func (_c *MockService_Pull_Call) RunAndReturn(run func(context.Context) error) *MockService_Pull_Call
type MockService_SetLocalExclude_Call ¶ added in v0.1.22
MockService_SetLocalExclude_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetLocalExclude'
func (*MockService_SetLocalExclude_Call) Return ¶ added in v0.1.22
func (_c *MockService_SetLocalExclude_Call) Return(_a0 error) *MockService_SetLocalExclude_Call
func (*MockService_SetLocalExclude_Call) Run ¶ added in v0.1.22
func (_c *MockService_SetLocalExclude_Call) Run(run func(patterns []string)) *MockService_SetLocalExclude_Call
func (*MockService_SetLocalExclude_Call) RunAndReturn ¶ added in v0.1.22
func (_c *MockService_SetLocalExclude_Call) RunAndReturn(run func([]string) error) *MockService_SetLocalExclude_Call
type MockService_Sync_Call ¶ added in v0.1.22
MockService_Sync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Sync'
func (*MockService_Sync_Call) Return ¶ added in v0.1.22
func (_c *MockService_Sync_Call) Return(_a0 error) *MockService_Sync_Call
func (*MockService_Sync_Call) Run ¶ added in v0.1.22
func (_c *MockService_Sync_Call) Run(run func(ctx context.Context, url string, branch string, sparseCheckout []string)) *MockService_Sync_Call
func (*MockService_Sync_Call) RunAndReturn ¶ added in v0.1.22
func (_c *MockService_Sync_Call) RunAndReturn(run func(context.Context, string, string, []string) error) *MockService_Sync_Call
type Service ¶ added in v0.1.22
type Service interface {
Clone(ctx context.Context, url, branch string) error
SetLocalExclude(patterns []string) error
Sync(ctx context.Context, url, branch string, sparseCheckout []string) error
Pull(ctx context.Context) error
GetInfo(ctx context.Context) (*CommitInfo, error)
GetRemote(ctx context.Context) (string, error)
GetTopLevel(ctx context.Context) (string, error)
}