setupworkspace

package
v0.6.59 Latest Latest
Warning

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

Go to latest
Published: May 18, 2022 License: MIT Imports: 14 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 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 PathExists added in v0.6.50

func PathExists(path string) bool

func PrintErrFromFunc added in v0.6.50

func PrintErrFromFunc(fn func() error)

func RunSetupScript added in v0.6.57

func RunSetupScript(dotBrevPath string, workingDir string, user *user.User) 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
	UserRepoName string
	User         *user.User
	Params       *store.SetupParamsV0
}

func NewWorkspaceIniter added in v0.6.50

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

func (WorkspaceIniter) BuildHomePath added in v0.6.50

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

func (WorkspaceIniter) BuildProjectDotBrevPath added in v0.6.53

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

func (WorkspaceIniter) BuildProjectPath added in v0.6.50

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

func (WorkspaceIniter) BuildUserDotBrevPath added in v0.6.53

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

func (WorkspaceIniter) BuildUserPath added in v0.6.50

func (w WorkspaceIniter) BuildUserPath(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) EnsureGitAuthOrError added in v0.6.57

func (w WorkspaceIniter) EnsureGitAuthOrError() error

func (WorkspaceIniter) GitCloneIfDNE added in v0.6.50

func (w WorkspaceIniter) GitCloneIfDNE(url string, dirPath string, branch string) 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) RunProjectSetup added in v0.6.50

func (w WorkspaceIniter) RunProjectSetup() error

func (WorkspaceIniter) RunUserSetup added in v0.6.50

func (w WorkspaceIniter) RunUserSetup() 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(username string, email string) error

func (WorkspaceIniter) SetupProject added in v0.6.50

func (w WorkspaceIniter) SetupProject(source string, branch string) error

source is a git url

func (WorkspaceIniter) SetupProjectDotBrev added in v0.6.50

func (w WorkspaceIniter) SetupProjectDotBrev(defaultSetupScriptMaybeB64 *string) error

func (WorkspaceIniter) SetupSSH added in v0.6.50

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

func (WorkspaceIniter) SetupUserDotBrev added in v0.6.50

func (w WorkspaceIniter) SetupUserDotBrev(source string) error

source is a git url

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