mocks

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: MIT Imports: 7 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) <-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 (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 added in v0.3.0

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) <-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 (m *MockProjectManager) DeleteProject(ctx context.Context, projectId string) <-chan result.Empty

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 added in v0.3.0

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

func (*MockProjectManager) ReadFile added in v0.3.0

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 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 (m *MockProjectManager) UpdateFile(ctx context.Context, projectId, path, content string) (*model.File, error)

func (*MockProjectManager) UpdateLines added in v0.3.0

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