setupworkspace

package
v0.6.268 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendToOrCreateFile added in v0.6.55

func AppendToOrCreateFile(filePath string, toAppend string) error

similar to redirect operator '>'

func BuildAndRunCmd added in v0.6.129

func BuildAndRunCmd(name string, args ...string) error

func ChownFilePathToUser added in v0.6.53

func ChownFilePathToUser(filePath string, user *user.User) error

func ChownFileToUser added in v0.6.50

func ChownFileToUser(file *os.File, user *user.User) error

func CmdAsUser added in v0.6.50

func CmdAsUser(cmd *exec.Cmd, user *user.User) error

func CmdBuilder added in v0.6.50

func CmdBuilder(name string, args ...string) *exec.Cmd

func CmdStringBuilder added in v0.6.50

func CmdStringBuilder(c string) *exec.Cmd

func GetUserFromUserStr added in v0.6.50

func GetUserFromUserStr(userStr string) (*user.User, error)

func InitRepos added in v0.6.92

func InitRepos(repos entity.ReposV0) entity.ReposV0

func MakeExecFromSetupParams added in v0.6.92

func MakeExecFromSetupParams(params store.SetupParamsV0) entity.ExecsV0

func MakeProjectRepo added in v0.6.92

func MakeProjectRepo(params store.SetupParamsV0) entity.ReposV0

func MakeUserRepo added in v0.6.92

func MakeUserRepo(params store.SetupParamsV0) entity.ReposV0

func MergeExecs added in v0.6.92

func MergeExecs(repos ...entity.ExecsV0) entity.ExecsV0

func MergeRepos added in v0.6.92

func MergeRepos(repos ...entity.ReposV0) entity.ReposV0

func PathExists added in v0.6.50

func PathExists(path string) bool

func PrintErrFromFunc added in v0.6.50

func PrintErrFromFunc(fn func() error)

func RunCMDWithOutput added in v0.6.189

func RunCMDWithOutput(name string, args ...string) (string, error)

func RunSetupScript added in v0.6.57

func RunSetupScript(logsPath string, workingDir string, setupExecPath string, user *user.User, archivePath string) error

func SendLogToFiles added in v0.6.57

func SendLogToFiles(cmd *exec.Cmd, filePaths ...string) (func(), error)

func SetupWorkspace added in v0.6.50

func SetupWorkspace(params *store.SetupParamsV0) error

func ValidateSetup

func ValidateSetup(_ store.SetupParamsV0) error

Types

type CommandGroup added in v0.6.50

type CommandGroup struct {
	Cmds []*exec.Cmd
	User *user.User
}

func NewCommandGroup added in v0.6.50

func NewCommandGroup() *CommandGroup

func (*CommandGroup) AddCmd added in v0.6.50

func (c *CommandGroup) AddCmd(cmd *exec.Cmd)

func (*CommandGroup) Run added in v0.6.50

func (c *CommandGroup) Run() error

func (*CommandGroup) WithUser added in v0.6.50

func (c *CommandGroup) WithUser(user *user.User) *CommandGroup

type WorkspaceIniter added in v0.6.50

type WorkspaceIniter struct {
	WorkspaceDir       string
	User               *user.User
	Params             *store.SetupParamsV0
	ReposV0            entity.ReposV0
	ExecsV0            entity.ExecsV0
	ReposV1            entity.ReposV1
	ExecsV1            entity.ExecsV1
	VscodeExtensionIDs []string
}

func NewWorkspaceIniter added in v0.6.50

func NewWorkspaceIniter(workspaceDir string, user *user.User, params *store.SetupParamsV0) *WorkspaceIniter

func (WorkspaceIniter) BuildHomePath added in v0.6.50

func (w WorkspaceIniter) BuildHomePath(suffix ...string) string

func (WorkspaceIniter) BuildWorkspacePath added in v0.6.50

func (w WorkspaceIniter) BuildWorkspacePath(suffix ...string) string

func (WorkspaceIniter) ChownFileToUser added in v0.6.50

func (w WorkspaceIniter) ChownFileToUser(file *os.File) error

func (WorkspaceIniter) CmdAsUser added in v0.6.50

func (w WorkspaceIniter) CmdAsUser(cmd *exec.Cmd) error

func (WorkspaceIniter) CreateTempStrExecFile added in v0.6.84

func (w WorkspaceIniter) CreateTempStrExecFile(execPath string, execStr string) error

func (WorkspaceIniter) CreateVerbYamlFile added in v0.6.250

func (w WorkspaceIniter) CreateVerbYamlFile() error

func (WorkspaceIniter) EnsureGitAuthOrError added in v0.6.57

func (w WorkspaceIniter) EnsureGitAuthOrError() error

func (WorkspaceIniter) GetExecPath added in v0.6.84

func (w WorkspaceIniter) GetExecPath(name entity.ExecName, exec entity.ExecV1) (string, error)

func (WorkspaceIniter) GetLogArchivePath added in v0.6.84

func (w WorkspaceIniter) GetLogArchivePath(name entity.ExecName, exec entity.ExecV1) (string, error)

func (WorkspaceIniter) GetLogPath added in v0.6.84

func (w WorkspaceIniter) GetLogPath(name entity.ExecName, exec entity.ExecV1) (string, error)

func (WorkspaceIniter) GetRepoPath added in v0.6.84

func (w WorkspaceIniter) GetRepoPath(repo entity.RepoV1) (string, error)

func (WorkspaceIniter) GitCloneIfDNE added in v0.6.50

func (w WorkspaceIniter) GitCloneIfDNE(url string, dirPath string, branch string) error

func (WorkspaceIniter) InstallVscode added in v0.6.103

func (w WorkspaceIniter) InstallVscode() error

func (WorkspaceIniter) PrepareWorkspace added in v0.6.50

func (w WorkspaceIniter) PrepareWorkspace() error

func (WorkspaceIniter) RunApplicationScripts added in v0.6.54

func (w WorkspaceIniter) RunApplicationScripts(scripts []string) error

func (WorkspaceIniter) RunExecs added in v0.6.68

func (w WorkspaceIniter) RunExecs() error

func (WorkspaceIniter) Setup added in v0.6.50

func (w WorkspaceIniter) Setup() error

func (WorkspaceIniter) SetupCodeServer added in v0.6.50

func (w WorkspaceIniter) SetupCodeServer(password string, bindAddr string, workspaceHost string) error

func (WorkspaceIniter) SetupGit added in v0.6.50

func (w WorkspaceIniter) SetupGit() error

func (WorkspaceIniter) SetupRepos added in v0.6.68

func (w WorkspaceIniter) SetupRepos() error

func (WorkspaceIniter) SetupSSH added in v0.6.50

func (w WorkspaceIniter) SetupSSH(keys *store.KeyPair) error

func (WorkspaceIniter) SetupVsCodeExtensions added in v0.6.68

func (w WorkspaceIniter) SetupVsCodeExtensions() error

func (WorkspaceIniter) ShouldCheckGithubAuth added in v0.6.57

func (w WorkspaceIniter) ShouldCheckGithubAuth() bool

func (WorkspaceIniter) ShouldCheckGitlabAuth added in v0.6.57

func (w WorkspaceIniter) ShouldCheckGitlabAuth() bool

Jump to

Keyboard shortcuts

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