Documentation ¶
Index ¶
- Constants
- type CreateProjectRequest
- type InMemoryStore
- func (s *InMemoryStore) CreateProject(project *model.Project) error
- func (s *InMemoryStore) DeleteProject(id string) error
- func (s *InMemoryStore) GetProject(id string) (*model.Project, error)
- func (s *InMemoryStore) GetProjects() ([]*model.Project, error)
- func (s *InMemoryStore) UpdateProject(project *model.Project) error
- type Manager
- type ManagerImpl
- func (pm ManagerImpl) ApplyPatch(ctx context.Context, projectId, path, patch string) (*model.File, error)
- func (pm ManagerImpl) Cleanup(ctx context.Context) error
- func (pm ManagerImpl) CreateFile(ctx context.Context, projectId, path, content string) (*model.File, error)
- func (pm ManagerImpl) CreateProject(ctx context.Context, request CreateProjectRequest) <-chan result.Result[model.Project]
- func (pm ManagerImpl) CreateTask(ctx context.Context, projectId string, command string) (TaskResult, error)
- func (pm ManagerImpl) DeleteFile(ctx context.Context, projectId, path string) error
- func (pm ManagerImpl) DeleteProject(ctx context.Context, projectId string) <-chan result.Empty
- func (pm ManagerImpl) GetProject(ctx context.Context, projectId string) (model.Project, error)
- func (pm ManagerImpl) GetProjects(ctx context.Context) ([]*model.Project, error)
- func (pm ManagerImpl) ListFiles(ctx context.Context, projectId string, opts ...files.ListFileOption) ([]*model.File, error)
- func (pm ManagerImpl) ReadFile(ctx context.Context, projectId, path string) (*model.File, error)
- func (pm ManagerImpl) ResolveTaskAlias(ctx context.Context, projectId string, alias string) (devcontainer.Task, error)
- func (pm ManagerImpl) SearchSymbols(ctx context.Context, projectId model.ProjectId, query string, ...) ([]lsp.SymbolInfo, error)
- func (pm ManagerImpl) UpdateFile(ctx context.Context, projectId, path, content string) (*model.File, error)
- func (pm ManagerImpl) UpdateLines(ctx context.Context, projectId, path string, lineDiff files.LineDiffChunk) (*model.File, error)
- type ProjectAlreadyExistsError
- type ProjectNotFoundError
- type Repository
- type Store
- type TaskResult
Constants ¶
View Source
const MaxDiagnosticsDelay = time.Second * 1
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateProjectRequest ¶
type CreateProjectRequest struct { Repository Repository `json:"repository"` DevContainer *devcontainer.Config `json:"devcontainer,omitempty"` }
type InMemoryStore ¶
type InMemoryStore struct {
// contains filtered or unexported fields
}
func NewInMemoryStore ¶
func NewInMemoryStore(store map[string]*model.Project) *InMemoryStore
func (*InMemoryStore) CreateProject ¶
func (s *InMemoryStore) CreateProject(project *model.Project) error
func (*InMemoryStore) DeleteProject ¶
func (s *InMemoryStore) DeleteProject(id string) error
func (*InMemoryStore) GetProject ¶
func (s *InMemoryStore) GetProject(id string) (*model.Project, error)
func (*InMemoryStore) GetProjects ¶
func (s *InMemoryStore) GetProjects() ([]*model.Project, error)
func (*InMemoryStore) UpdateProject ¶
func (s *InMemoryStore) UpdateProject(project *model.Project) error
type Manager ¶
type Manager interface { ApplyPatch(ctx context.Context, projectId, path, patch string) (*model.File, error) Cleanup(ctx context.Context) error CreateFile(ctx context.Context, projectId, path, content string) (*model.File, error) CreateProject(ctx context.Context, request CreateProjectRequest) <-chan result.Result[model.Project] CreateTask(ctx context.Context, projectId model.ProjectId, command string) (TaskResult, error) DeleteFile(ctx context.Context, projectId, path string) error DeleteProject(ctx context.Context, projectId model.ProjectId) <-chan result.Empty GetProject(ctx context.Context, projectId model.ProjectId) (model.Project, error) GetProjects(ctx context.Context) ([]*model.Project, error) ListFiles(ctx context.Context, projectId string, opts ...files.ListFileOption) ([]*model.File, error) ReadFile(ctx context.Context, projectId, path string) (*model.File, error) ResolveTaskAlias(ctx context.Context, projectId model.ProjectId, alias string) (devcontainer.Task, error) SearchSymbols(ctx context.Context, projectId model.ProjectId, query string, symbolFilter lsp.SymbolFilter) ([]lsp.SymbolInfo, error) UpdateFile(ctx context.Context, projectId, path, content string) (*model.File, error) UpdateLines(ctx context.Context, projectId, path string, lineDiff files.LineDiffChunk) (*model.File, error) }
func NewProjectManager ¶
func NewProjectManager( devContainerRunner devcontainer.Runner, projectStore Store, projectsRoot string, fileManager files.FileManager, lspService lsp.Service, languageDetector lsp.LanguageDetector, randomString func(int) string, ) Manager
type ManagerImpl ¶
type ManagerImpl struct {
// contains filtered or unexported fields
}
func (ManagerImpl) ApplyPatch ¶ added in v0.3.0
func (ManagerImpl) CreateFile ¶ added in v0.3.0
func (ManagerImpl) CreateProject ¶
func (pm ManagerImpl) CreateProject(ctx context.Context, request CreateProjectRequest) <-chan result.Result[model.Project]
func (ManagerImpl) CreateTask ¶
func (pm ManagerImpl) CreateTask(ctx context.Context, projectId string, command string) (TaskResult, error)
func (ManagerImpl) DeleteFile ¶ added in v0.3.0
func (pm ManagerImpl) DeleteFile(ctx context.Context, projectId, path string) error
func (ManagerImpl) DeleteProject ¶
func (ManagerImpl) GetProject ¶
func (ManagerImpl) GetProjects ¶
func (ManagerImpl) ListFiles ¶ added in v0.3.0
func (pm ManagerImpl) ListFiles(ctx context.Context, projectId string, opts ...files.ListFileOption) ([]*model.File, error)
func (ManagerImpl) ResolveTaskAlias ¶
func (pm ManagerImpl) ResolveTaskAlias(ctx context.Context, projectId string, alias string) (devcontainer.Task, error)
func (ManagerImpl) SearchSymbols ¶ added in v0.4.0
func (pm ManagerImpl) SearchSymbols(ctx context.Context, projectId model.ProjectId, query string, symbolFilter lsp.SymbolFilter) ([]lsp.SymbolInfo, error)
func (ManagerImpl) UpdateFile ¶ added in v0.3.0
func (ManagerImpl) UpdateLines ¶ added in v0.3.0
func (pm ManagerImpl) UpdateLines(ctx context.Context, projectId, path string, lineDiff files.LineDiffChunk) (*model.File, error)
type ProjectAlreadyExistsError ¶ added in v0.3.0
type ProjectAlreadyExistsError struct {
// contains filtered or unexported fields
}
func NewProjectAlreadyExistsError ¶ added in v0.3.0
func NewProjectAlreadyExistsError(projectId string) *ProjectAlreadyExistsError
func (ProjectAlreadyExistsError) Error ¶ added in v0.3.0
func (e ProjectAlreadyExistsError) Error() string
type ProjectNotFoundError ¶ added in v0.3.0
type ProjectNotFoundError struct {
// contains filtered or unexported fields
}
func NewProjectNotFoundError ¶ added in v0.3.0
func NewProjectNotFoundError(projectId string) *ProjectNotFoundError
func (ProjectNotFoundError) Error ¶ added in v0.3.0
func (e ProjectNotFoundError) Error() string
type Repository ¶
type TaskResult ¶
Click to show internal directories.
Click to hide internal directories.