Documentation
¶
Index ¶
- func DiffListFilesOpts(want files.ListFilesOptions, got ...files.ListFileOption) (diff string)
- type MockFileManager
- func (m *MockFileManager) ApplyPatch(ctx context.Context, fs afero.Fs, path, patch string) (*model.File, error)
- func (m *MockFileManager) CreateFile(ctx context.Context, fs afero.Fs, path, content string) (*model.File, error)
- func (m *MockFileManager) DeleteFile(ctx context.Context, fs afero.Fs, path string) error
- func (m *MockFileManager) ListFiles(ctx context.Context, fs afero.Fs) ([]*model.File, error)
- func (m *MockFileManager) ReadFile(ctx context.Context, fs afero.Fs, path string) (*model.File, error)
- func (m *MockFileManager) UpdateFile(ctx context.Context, fs afero.Fs, path, content string) (*model.File, error)
- func (m *MockFileManager) UpdateLines(ctx context.Context, fs afero.Fs, path string, lineDiff files.LineDiffChunk) (*model.File, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiffListFilesOpts ¶
func DiffListFilesOpts(want files.ListFilesOptions, got ...files.ListFileOption) (diff string)
Types ¶
type MockFileManager ¶
type MockFileManager struct {
CreateFileFunc func(ctx context.Context, fs afero.Fs, path, content string) (*model.File, error)
ReadFileFunc func(ctx context.Context, fs afero.Fs, path string) (*model.File, error)
UpdateFileFunc func(ctx context.Context, fs afero.Fs, path, content string) (*model.File, error)
DeleteFileFunc func(ctx context.Context, fs afero.Fs, path string) error
ListFilesFunc func(ctx context.Context, fs afero.Fs) ([]*model.File, error)
ApplyPatchFunc func(ctx context.Context, fs afero.Fs, path, patch string) (*model.File, error)
UpdateLinesFunc func(ctx context.Context, fs afero.Fs, path string, lineDiff files.LineDiffChunk) (*model.File, error)
}
MockFileManager is a mock of the filemanager.FileManager interface for testing
func (*MockFileManager) ApplyPatch ¶
func (*MockFileManager) CreateFile ¶
func (*MockFileManager) DeleteFile ¶
func (*MockFileManager) UpdateFile ¶
func (*MockFileManager) UpdateLines ¶
Click to show internal directories.
Click to hide internal directories.