{"modulePath":"github.com/devfile/devworkspace-operator","version":"v1.1.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package internal\n\n## Constants\n\n```go\nconst (\n\tProjectSparseCheckout = \"sparseCheckout\"\n\tProjectSubDir         = \"subDir\"\n)\n```\n\n```go\nconst (\n\tBaseRetryDelay = 1 * time.Second\n)\n```\n\n## Variables\n\n```go\nvar (\n\tProjectsRoot string\n\tCloneTmpDir  string\n\tCloneRetries int\n)\n```\n\n## Functions\n\n```go\nfunc CheckProjectState(project *dw.Project) (needClone, needRemotes bool, err error)\n```\nCheckProjectState Checks that a project's configuration is reflected in an on-disk git repository. - Returns needClone == true if the project has not yet been cloned - Returns needRemotes == true if the remotes configured in the project are not available in the on-disk repo\n\nRemotes in provided project are checked against what is configured in the git repo, but only in one direction. The git repo can have additional remotes -- they will be ignored here. If both the project and git repo have remote A configured, but the corresponding remote URL is different, needRemotes will be true.\n\n```go\nfunc DirExists(dir string) (bool, error)\n```\nDirExists returns true if the path at dir exists and is a directory. Returns an error if the path exists in the filesystem but does not refer to a directory.\n\n```go\nfunc GetAdditionalCerts() (certs *x509.CertPool, warnings []string, err error)\n```\n\n```go\nfunc GetAuthForHost(repoURLStr string) (gittransport.AuthMethod, error)\n```\n\n```go\nfunc OpenRepo(repoPath string) (*git.Repository, error)\n```\nOpenRepo returns the git repo on disk described by the devworkspace Project. If the repo does not currently exist, returns nil. Returns an error if an unexpected error occurs opening the git repo.\n\n```go\nfunc ReadFlattenedDevWorkspace() (*dw.DevWorkspaceTemplateSpec, error)\n```\nReadFlattenedDevWorkspace reads the flattened DevWorkspaceTemplateSpec from disk. The location of the flattened yaml is determined from the DevWorkspace Operator-provisioned environment variable.\n\n```go\nfunc StarterProjectToRegularProject(starterProject *dw.StarterProject) dw.Project\n```\nStarterProjectToRegularProject converts a starter project defined in a DevWorkspace to a standard Project for easier handling\n\n","path":"github.com/devfile/devworkspace-operator/project-clone/internal","name":"internal","synopsis":"","isRedistributable":true}
