Beispiel #1
0
func (i RepoIdentifier) GitAccessPathFor(name string, write bool) string {
	var access string
	if write {
		access = ".write"
	} else {
		access = ".read"
	}
	return utils.IsolateContentPathWithPerm(filepath.Join(config.ContainerBasePath(), "access", "git"), string(i), name+access, 0775)
}
Beispiel #2
0
func (i Identifier) BaseHomePath() string {
	return utils.IsolateContentPathWithPerm(filepath.Join(config.ContainerBasePath(), "home"), string(i), "", 0775)
}
Beispiel #3
0
func (i Identifier) SocketUnitPathFor() string {
	base := utils.IsolateContentPathWithPerm(filepath.Join(config.ContainerBasePath(), "units"), string(i), "", 0775)
	return filepath.Join(filepath.Dir(base), i.SocketUnitNameFor())
}
Beispiel #4
0
func (i Identifier) VersionedUnitPathFor(suffix string) string {
	return utils.IsolateContentPathWithPerm(filepath.Join(config.ContainerBasePath(), "units"), string(i), suffix, 0775)
}
Beispiel #5
0
func (i Identifier) RunPathFor() string {
	return utils.IsolateContentPathWithPerm(config.ContainerRunPath(), string(i), "/", 0775)
}
Beispiel #6
0
func publicKeyPathFor(f utils.Fingerprint) string {
	return utils.IsolateContentPathWithPerm(filepath.Join(config.ContainerBasePath(), "keys", "public"), f.ToShortName(), "", 0775)
}
Beispiel #7
0
func SshAccessPathFor(i containers.Identifier, name string) string {
	return utils.IsolateContentPathWithPerm(filepath.Join(config.ContainerBasePath(), "access", "containers", "ssh"), string(i), name, 0775)
}
Beispiel #8
0
func (i RepoIdentifier) SshAccessBasePath() string {
	return utils.IsolateContentPathWithPerm(filepath.Join(config.ContainerBasePath(), "access", "git"), string(i), "", 0775)
}
Beispiel #9
0
func (i RepoIdentifier) HomePath() string {
	return utils.IsolateContentPathWithPerm(filepath.Join(config.ContainerBasePath(), fmt.Sprintf("%shome", RepoIdentifierPrefix)), string(i), "home", 0775)
}