Lines Matching refs:w
42 func (w Workspace) Create(workspaceName string, codebaseName string) (string, error) {
52 workspaceDir, err := w.GetDir(workspaceName)
64 if _, err = w.composer.Compose(codebaseDir, workspaceDir); err != nil {
71 func (w Workspace) Recreate(workspaceName string) (string, error) {
77 workspaceDir, err := w.GetDir(workspaceName)
85 if _, err = w.composer.Compose(codebaseDir, workspaceDir); err != nil {
92 func (w Workspace) GetDir(workspaceName string) (string, error) {
98 dir := filepath.Join(w.topDir, workspaceName)
103 func (w Workspace) GetCodebase(workspaceName string) (string, error) {
113 func (w *Workspace) SetTopDir(dir string) {
114 w.topDir = dir
117 func (w Workspace) List() map[string]string {
126 func (w Workspace) DetachGitWorktrees(workspaceName string, unbindList []string) error {
127 workspaceDir, err := w.GetDir(workspaceName)
141 codebaseName, err := w.GetCodebase(workspaceName)
214 func (w Workspace) Remove(remove string) (*config.Config, error) {
220 workspaceDir, err := w.GetDir(remove)
224 unbindList, err := w.composer.Dismantle(workspaceDir)
229 if err = w.DetachGitWorktrees(remove, unbindList); err != nil {
241 func (w Workspace) Edit(editPath string) (string, string, error) {
250 relProjectPath, err := w.getReadOnlyProjectFromPath(editPath)
254 workspaceName, err := w.getWorkspaceFromPath(editPath)
258 workspaceDir, err := w.GetDir(workspaceName)
262 codebaseName, err := w.GetCodebase(workspaceName)
271 if err = w.composer.Unbind(wsProjectPath); err != nil {
292 func (w Workspace) getReadOnlyProjectFromPath(inPath string) (string, error) {
293 worspaceName, err := w.getWorkspaceFromPath(inPath)
297 workspacePath, err := w.GetDir(worspaceName)
301 bindList, err := w.composer.List(workspacePath)
318 func (w Workspace) getWorkspaceFromPath(inPath string) (string, error) {
319 for workspaceName, _ := range w.List() {
320 dir, err := w.GetDir(workspaceName)