Documentation ¶
Index ¶
- Variables
- func ConcatLines(lines []string) string
- func PtrTo[T any](val T) *T
- type BoolArg
- type MockCommandExecutor
- func (m *MockCommandExecutor) Run(ctx context.Context, command string, args []string, settings ...cmd.Setting) (int, error)
- func (m *MockCommandExecutor) RunQuiet(ctx context.Context, command string, args ...string) (int, error)
- func (m *MockCommandExecutor) RunStdout(ctx context.Context, command string, args ...string) (int, error)
- type MockFileSystem
- func (m *MockFileSystem) DeleteFile(filename string) (bool, error)
- func (m *MockFileSystem) FileExists(filename string) (bool, error)
- func (m *MockFileSystem) GetLocalExecutable(name string) (string, error)
- func (m *MockFileSystem) ReadDirRecursive(path string, depth int, strictDepth bool) ([]common.ReadDirEntry, error)
- func (m *MockFileSystem) ReadFileLines(filename string) ([]string, error)
- func (m *MockFileSystem) WriteFile(filename string, content []byte) error
- func (m *MockFileSystem) WriteLockFileFunc(filename string, writeFunc func(io.Writer) error) (common.LockFile, error)
- type MockGitHelper
- func (m *MockGitHelper) CloneBareRepo(ctx context.Context, url string, destination string) error
- func (m *MockGitHelper) CreateBundle(ctx context.Context, repoDir string, filename string) (bool, error)
- func (m *MockGitHelper) CreateBundleFromRefs(ctx context.Context, repoDir string, filename string, refs map[string]string) error
- func (m *MockGitHelper) CreateIncrementalBundle(ctx context.Context, repoDir string, filename string, prereqs []string) (bool, error)
- func (m *MockGitHelper) GetRemoteUrl(ctx context.Context, repoDir string) (string, error)
- func (m *MockGitHelper) UpdateBareRepo(ctx context.Context, repoDir string) error
- type MockLockFile
- type MockTraceLogger
- func (l *MockTraceLogger) ChildProcess(ctx context.Context, cmd *exec.Cmd) (func(error), func())
- func (l *MockTraceLogger) Error(ctx context.Context, err error) error
- func (l *MockTraceLogger) Errorf(ctx context.Context, format string, a ...any) error
- func (l *MockTraceLogger) Exit(ctx context.Context, exitCode int)
- func (l *MockTraceLogger) Fatal(ctx context.Context, err error)
- func (l *MockTraceLogger) Fatalf(ctx context.Context, format string, a ...any)
- func (l *MockTraceLogger) LogCommand(ctx context.Context, commandName string) context.Context
- func (l *MockTraceLogger) Region(ctx context.Context, category string, label string) (context.Context, func())
- type MockUserProvider
- type Pair
- type TestReadDirEntry
Constants ¶
This section is empty.
Variables ¶
View Source
var NotMockedValue notMocked = notMocked{}
Functions ¶
func ConcatLines ¶
Types ¶
type MockFileSystem ¶
func (*MockFileSystem) DeleteFile ¶
func (m *MockFileSystem) DeleteFile(filename string) (bool, error)
func (*MockFileSystem) FileExists ¶
func (m *MockFileSystem) FileExists(filename string) (bool, error)
func (*MockFileSystem) GetLocalExecutable ¶
func (m *MockFileSystem) GetLocalExecutable(name string) (string, error)
func (*MockFileSystem) ReadDirRecursive ¶
func (m *MockFileSystem) ReadDirRecursive(path string, depth int, strictDepth bool) ([]common.ReadDirEntry, error)
func (*MockFileSystem) ReadFileLines ¶
func (m *MockFileSystem) ReadFileLines(filename string) ([]string, error)
func (*MockFileSystem) WriteFile ¶
func (m *MockFileSystem) WriteFile(filename string, content []byte) error
func (*MockFileSystem) WriteLockFileFunc ¶
type MockGitHelper ¶
func (*MockGitHelper) CloneBareRepo ¶
func (*MockGitHelper) CreateBundle ¶
func (*MockGitHelper) CreateBundleFromRefs ¶
func (*MockGitHelper) CreateIncrementalBundle ¶
func (*MockGitHelper) GetRemoteUrl ¶
func (*MockGitHelper) UpdateBareRepo ¶
func (m *MockGitHelper) UpdateBareRepo(ctx context.Context, repoDir string) error
type MockLockFile ¶
func (*MockLockFile) Commit ¶
func (m *MockLockFile) Commit() error
func (*MockLockFile) Rollback ¶
func (m *MockLockFile) Rollback() error
type MockTraceLogger ¶
func (*MockTraceLogger) ChildProcess ¶
func (*MockTraceLogger) Error ¶
func (l *MockTraceLogger) Error(ctx context.Context, err error) error
func (*MockTraceLogger) Fatalf ¶
func (l *MockTraceLogger) Fatalf(ctx context.Context, format string, a ...any)
func (*MockTraceLogger) LogCommand ¶
type MockUserProvider ¶
func (*MockUserProvider) CurrentUser ¶
func (m *MockUserProvider) CurrentUser() (*user.User, error)
type TestReadDirEntry ¶
type TestReadDirEntry struct { PathVal string NameVal string IsDirVal bool TypeVal fs.FileMode InfoVal fs.FileInfo }
func (TestReadDirEntry) IsDir ¶
func (e TestReadDirEntry) IsDir() bool
func (TestReadDirEntry) Name ¶
func (e TestReadDirEntry) Name() string
func (TestReadDirEntry) Path ¶
func (e TestReadDirEntry) Path() string
func (TestReadDirEntry) Type ¶
func (e TestReadDirEntry) Type() fs.FileMode
Click to show internal directories.
Click to hide internal directories.