Documentation ¶
Index ¶
- type MockProjectManager
- func (m *MockProjectManager) ApplyPatch(ctx context.Context, projectId, path, patch string) (*model.File, error)
- func (m *MockProjectManager) Cleanup(ctx context.Context) error
- func (m *MockProjectManager) CreateFile(ctx context.Context, projectId, path, content string) (*model.File, error)
- func (m *MockProjectManager) CreateProject(ctx context.Context, request project.CreateProjectRequest) <-chan result.Result[model.Project]
- func (m *MockProjectManager) CreateTask(ctx context.Context, projectId string, command string) (project.TaskResult, error)
- func (m *MockProjectManager) DeleteFile(ctx context.Context, projectId, path string) error
- func (m *MockProjectManager) DeleteProject(ctx context.Context, projectId string) <-chan result.Empty
- func (m *MockProjectManager) GetProject(ctx context.Context, projectId string) (model.Project, error)
- func (m *MockProjectManager) GetProjects(ctx context.Context) ([]*model.Project, error)
- func (m *MockProjectManager) ListFiles(ctx context.Context, projectId string, opts ...files.ListFileOption) ([]*model.File, error)
- func (m *MockProjectManager) ReadFile(ctx context.Context, projectId, path string) (*model.File, error)
- func (m *MockProjectManager) ResolveTaskAlias(ctx context.Context, projectId string, alias string) (devcontainer.Task, error)
- func (m *MockProjectManager) SearchSymbols(ctx context.Context, projectId model.ProjectId, query string, ...) ([]lsp.SymbolInfo, error)
- func (m *MockProjectManager) UpdateFile(ctx context.Context, projectId, path, content string) (*model.File, error)
- func (m *MockProjectManager) UpdateLines(ctx context.Context, projectId, path string, lineDiff files.LineDiffChunk) (*model.File, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockProjectManager ¶
type MockProjectManager struct { ApplyPatchFunc func(ctx context.Context, projectId, path, patch string) (*model.File, error) CleanupFunc func(ctx context.Context) error CreateFileFunc func(ctx context.Context, projectId, path, content string) (*model.File, error) CreateProjectFunc func(ctx context.Context, request project.CreateProjectRequest) <-chan result.Result[model.Project] CreateTaskFunc func(ctx context.Context, projectId string, command string) (project.TaskResult, error) DeleteFileFunc func(ctx context.Context, projectId, path string) error DeleteProjectFunc func(ctx context.Context, projectId string) <-chan result.Empty GetProjectFunc func(ctx context.Context, projectId string) (model.Project, error) GetProjectsFunc func(ctx context.Context) ([]*model.Project, error) ListFilesFunc func(ctx context.Context, projectId string, opts ...files.ListFileOption) ([]*model.File, error) ReadFileFunc func(ctx context.Context, projectId, path string) (*model.File, error) ResolveTaskAliasFunc func(ctx context.Context, projectId string, alias string) (devcontainer.Task, error) SearchSymbolsFunc func(ctx context.Context, projectId model.ProjectId, query string, symbolFilter lsp.SymbolFilter) ([]lsp.SymbolInfo, error) UpdateFileFunc func(ctx context.Context, projectId, path, content string) (*model.File, error) UpdateLinesFunc func(ctx context.Context, projectId, path string, lineDiff files.LineDiffChunk) (*model.File, error) }
MockProjectManager is a mock of the project.Manager interface for testing
func (*MockProjectManager) ApplyPatch ¶ added in v0.3.0
func (*MockProjectManager) Cleanup ¶
func (m *MockProjectManager) Cleanup(ctx context.Context) error
func (*MockProjectManager) CreateFile ¶ added in v0.3.0
func (*MockProjectManager) CreateProject ¶
func (m *MockProjectManager) CreateProject(ctx context.Context, request project.CreateProjectRequest) <-chan result.Result[model.Project]
func (*MockProjectManager) CreateTask ¶
func (m *MockProjectManager) CreateTask(ctx context.Context, projectId string, command string) (project.TaskResult, error)
func (*MockProjectManager) DeleteFile ¶ added in v0.3.0
func (m *MockProjectManager) DeleteFile(ctx context.Context, projectId, path string) error
func (*MockProjectManager) DeleteProject ¶
func (*MockProjectManager) GetProject ¶
func (*MockProjectManager) GetProjects ¶
func (*MockProjectManager) ListFiles ¶ added in v0.3.0
func (m *MockProjectManager) ListFiles(ctx context.Context, projectId string, opts ...files.ListFileOption) ([]*model.File, error)
func (*MockProjectManager) ResolveTaskAlias ¶
func (m *MockProjectManager) ResolveTaskAlias(ctx context.Context, projectId string, alias string) (devcontainer.Task, error)
func (*MockProjectManager) SearchSymbols ¶ added in v0.4.0
func (m *MockProjectManager) SearchSymbols(ctx context.Context, projectId model.ProjectId, query string, symbolFilter lsp.SymbolFilter) ([]lsp.SymbolInfo, error)
func (*MockProjectManager) UpdateFile ¶ added in v0.3.0
func (*MockProjectManager) UpdateLines ¶ added in v0.3.0
func (m *MockProjectManager) UpdateLines(ctx context.Context, projectId, path string, lineDiff files.LineDiffChunk) (*model.File, error)
Click to show internal directories.
Click to hide internal directories.