interfaces

package
v0.27.1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2025 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package interfaces defines the workspace interface for dependency injection. This package is separate to avoid circular imports.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name    string   `json:"name,omitempty"`
	Folders []Folder `json:"folders"`
}

Config represents the configuration of a workspace.

type CreateWorktreeOpts

type CreateWorktreeOpts struct {
	IDEName       string
	IssueInfo     *issue.Info
	WorkspaceName string
}

CreateWorktreeOpts contains optional parameters for worktree creation in workspace mode.

type Folder

type Folder struct {
	Name string `json:"name"`
	Path string `json:"path"`
}

Folder represents a folder in a workspace.

type NewWorkspaceParams

type NewWorkspaceParams struct {
	Dependencies interface{} // *dependencies.Dependencies
	File         string      // workspace file path
}

NewWorkspaceParams contains parameters for creating a new Workspace instance.

type Workspace

type Workspace interface {
	Validate() error
	CreateWorktree(branch string, opts ...CreateWorktreeOpts) (string, error)
	DeleteWorktree(branch string, force bool) error
	DeleteAllWorktrees(force bool) error
	ListWorktrees() ([]status.WorktreeInfo, error)
	OpenWorktree(workspaceName, branch string) (string, error)
	SetLogger(logger logger.Logger)
	Load() error
	ParseFile(filename string) (Config, error)
	GetName(config Config, filename string) string
	ValidateWorkspaceReferences() error
}

Workspace defines the interface for workspace operations. This interface is implemented by the concrete workspace types.

type WorkspaceProvider

type WorkspaceProvider func(params NewWorkspaceParams) Workspace

WorkspaceProvider defines the function signature for creating workspace instances.

Jump to

Keyboard shortcuts

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