gitspaces

package
v2.0.34 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProjectStruct

type ProjectStruct struct {
	Path string
	Name string
	// contains filtered or unexported fields
}

func ChooseProject

func ChooseProject() (project *ProjectStruct, err error)

func CreateProject

func CreateProject(dir string, url string, numSpaces int) (project *ProjectStruct, err error)

Create creates the Project directory, dotfile, sleeping clones, and the default clone in the spaces' working directory named after the repo's default branch. It returns a pointer to the Project object or an error

func GetProject

func GetProject() (*ProjectStruct, error)

func GetProjectFromPath

func GetProjectFromPath(path string) (*ProjectStruct, error)

func NewProject

func NewProject(path string) (project *ProjectStruct)

func (*ProjectStruct) ChooseSpace

func (project *ProjectStruct) ChooseSpace() (space *SpaceStruct, err error)

func (*ProjectStruct) WakeupSpace

func (project *ProjectStruct) WakeupSpace() (space *SpaceStruct, err error)

type SpaceStruct

type SpaceStruct struct {
	Name string
	Path string
	// contains filtered or unexported fields
}

Gitspace is a struct that represents a git repository

func CreateSpaceFromUrl

func CreateSpaceFromUrl(project *ProjectStruct, url string, path string) (space *SpaceStruct, err error)

func GetSpace

func GetSpace() (*SpaceStruct, error)

func GetSpaceFromPath

func GetSpaceFromPath(path string) (*SpaceStruct, error)

func NewSpace

func NewSpace(project *ProjectStruct, path string) *SpaceStruct

NewSpace creates a new Space struct

func SwitchSpace

func SwitchSpace() (space *SpaceStruct, err error)

func (*SpaceStruct) Duplicate

func (space *SpaceStruct) Duplicate() (newSpace *SpaceStruct, err error)

func (*SpaceStruct) GetProject

func (space *SpaceStruct) GetProject() *ProjectStruct

func (*SpaceStruct) OpenVSCode

func (space *SpaceStruct) OpenVSCode() error

func (*SpaceStruct) Rename

func (space *SpaceStruct) Rename(arguments ...string) error

Rename renames the space. It takes a variadic parameter of type string, which represents the optional new name for the space. If successful, it returns nil. Otherwise, it returns an error.

func (*SpaceStruct) Sleep

func (space *SpaceStruct) Sleep() (err error)

func (*SpaceStruct) Wakeup

func (space *SpaceStruct) Wakeup() (err error)

Jump to

Keyboard shortcuts

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