mocks

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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) (*model.Project, error)
	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) error
	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.Files, 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)
	DocumentOutlineFunc  func(ctx context.Context, projectId string) (lsp.DocumentOutline, error)
}

MockProjectManager is a mock of the project.Manager interface for testing

func (*MockProjectManager) ApplyPatch

func (m *MockProjectManager) ApplyPatch(ctx context.Context, projectId, path, patch string) (*model.File, error)

func (*MockProjectManager) Cleanup

func (m *MockProjectManager) Cleanup(ctx context.Context) error

func (*MockProjectManager) CreateFile

func (m *MockProjectManager) CreateFile(ctx context.Context, projectId, path, content string) (*model.File, error)

func (*MockProjectManager) CreateProject

func (m *MockProjectManager) CreateProject(ctx context.Context, request project.CreateProjectRequest) (*model.Project, error)

func (*MockProjectManager) CreateTask

func (m *MockProjectManager) CreateTask(ctx context.Context, projectId string, command string) (project.TaskResult, error)

func (*MockProjectManager) DeleteFile

func (m *MockProjectManager) DeleteFile(ctx context.Context, projectId, path string) error

func (*MockProjectManager) DeleteProject

func (m *MockProjectManager) DeleteProject(ctx context.Context, projectId string) error

func (*MockProjectManager) DocumentOutline added in v0.5.0

func (m *MockProjectManager) DocumentOutline(ctx context.Context, projectId string, path string) (lsp.DocumentOutline, error)

func (*MockProjectManager) GetProject

func (m *MockProjectManager) GetProject(ctx context.Context, projectId string) (model.Project, error)

func (*MockProjectManager) GetProjects

func (m *MockProjectManager) GetProjects(ctx context.Context) ([]*model.Project, error)

func (*MockProjectManager) ListFiles

func (m *MockProjectManager) ListFiles(ctx context.Context, projectId string, opts ...files.ListFileOption) (model.Files, error)

func (*MockProjectManager) ReadFile

func (m *MockProjectManager) ReadFile(ctx context.Context, projectId, path string) (*model.File, error)

func (*MockProjectManager) ResolveTaskAlias

func (m *MockProjectManager) ResolveTaskAlias(ctx context.Context, projectId string, alias string) (devcontainer.Task, error)

func (*MockProjectManager) SearchSymbols

func (m *MockProjectManager) SearchSymbols(ctx context.Context, projectId model.ProjectId, query string, symbolFilter lsp.SymbolFilter) ([]lsp.SymbolInfo, error)

func (*MockProjectManager) UpdateFile

func (m *MockProjectManager) UpdateFile(ctx context.Context, projectId, path, content string) (*model.File, error)

func (*MockProjectManager) UpdateLines

func (m *MockProjectManager) UpdateLines(ctx context.Context, projectId, path string, lineDiff files.LineDiffChunk) (*model.File, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL