Documentation
¶
Overview ¶
Package ide provides interfaces and implementations for interacting with various IDEs.
Package ide is a generated GoMock package.
Index ¶
Constants ¶
const ( // CursorName is the name identifier for the Cursor IDE. CursorName = "cursor" // CursorCommand is the command to open Cursor. CursorCommand = "cursor" )
const (
// DummyName is the name identifier for the Dummy IDE.
DummyName = "dummy"
)
Variables ¶
var ( // ErrIDENotInstalled is returned when an IDE is not installed on the system. ErrIDENotInstalled = errors.New("IDE not installed") // ErrUnsupportedIDE is returned when an IDE is not supported. ErrUnsupportedIDE = errors.New("unsupported IDE") // ErrIDEExecutionFailed is returned when IDE command execution fails. ErrIDEExecutionFailed = errors.New("failed to execute IDE command") // ErrWorktreeNotFound is returned when a worktree is not found in status.yaml. ErrWorktreeNotFound = errors.New("worktree not found") )
Functions ¶
This section is empty.
Types ¶
type Cursor ¶
type Cursor struct {
// contains filtered or unexported fields
}
Cursor represents the Cursor IDE implementation.
func (*Cursor) IsInstalled ¶
IsInstalled checks if Cursor is installed on the system.
func (*Cursor) OpenRepository ¶
OpenRepository opens Cursor with the specified repository path.
type Dummy ¶
type Dummy struct {
// contains filtered or unexported fields
}
Dummy represents a dummy IDE implementation for testing.
func (*Dummy) IsInstalled ¶
IsInstalled always returns true for the dummy IDE.
func (*Dummy) OpenRepository ¶
OpenRepository does nothing but returns success.
type IDE ¶
type IDE interface { // Name returns the name of the IDE Name() string // IsInstalled checks if the IDE is installed on the system IsInstalled() bool // OpenRepository opens the IDE with the specified repository path OpenRepository(path string) error }
IDE interface defines the methods that all IDE implementations must provide.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages IDE implementations and provides a unified interface.
func NewManager ¶
NewManager creates a new IDE manager with registered IDE implementations.
type ManagerInterface ¶
type ManagerInterface interface { // GetIDE returns the IDE implementation for the given name GetIDE(name string) (IDE, error) // OpenIDE opens the specified IDE with the given path OpenIDE(name, path string, verbose bool) error }
ManagerInterface defines the interface for IDE management.
type MockIDE ¶
type MockIDE struct {
// contains filtered or unexported fields
}
MockIDE is a mock of IDE interface.
func NewMockIDE ¶
func NewMockIDE(ctrl *gomock.Controller) *MockIDE
NewMockIDE creates a new mock instance.
func (*MockIDE) EXPECT ¶
func (m *MockIDE) EXPECT() *MockIDEMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockIDE) OpenRepository ¶
OpenRepository mocks base method.
type MockIDEMockRecorder ¶
type MockIDEMockRecorder struct {
// contains filtered or unexported fields
}
MockIDEMockRecorder is the mock recorder for MockIDE.
func (*MockIDEMockRecorder) IsInstalled ¶
func (mr *MockIDEMockRecorder) IsInstalled() *gomock.Call
IsInstalled indicates an expected call of IsInstalled.
func (*MockIDEMockRecorder) Name ¶
func (mr *MockIDEMockRecorder) Name() *gomock.Call
Name indicates an expected call of Name.
func (*MockIDEMockRecorder) OpenRepository ¶
func (mr *MockIDEMockRecorder) OpenRepository(path any) *gomock.Call
OpenRepository indicates an expected call of OpenRepository.
type MockManagerInterface ¶
type MockManagerInterface struct {
// contains filtered or unexported fields
}
MockManagerInterface is a mock of ManagerInterface interface.
func NewMockManagerInterface ¶
func NewMockManagerInterface(ctrl *gomock.Controller) *MockManagerInterface
NewMockManagerInterface creates a new mock instance.
func (*MockManagerInterface) EXPECT ¶
func (m *MockManagerInterface) EXPECT() *MockManagerInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockManagerInterfaceMockRecorder ¶
type MockManagerInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockManagerInterfaceMockRecorder is the mock recorder for MockManagerInterface.