-
Notifications
You must be signed in to change notification settings - Fork 114
/
directories_provider.go
115 lines (86 loc) · 2.49 KB
/
directories_provider.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
package directories
import "path/filepath"
type Provider struct {
baseDir string
}
func NewProvider(baseDir string) Provider {
return Provider{baseDir: filepath.Clean(baseDir)}
}
func (p Provider) BaseDir() string {
return p.baseDir
}
func (p Provider) BoshDir() string {
return filepath.Join(p.BaseDir(), "bosh")
}
func (p Provider) BoshBinDir() string {
return filepath.Join(p.BoshDir(), "bin")
}
func (p Provider) EtcDir() string {
return filepath.Join(p.BoshDir(), "etc")
}
func (p Provider) StoreDir() string {
return filepath.Join(p.BaseDir(), "store")
}
func (p Provider) DataDir() string {
return filepath.Join(p.BaseDir(), "data")
}
func (p Provider) StoreMigrationDir() string {
return filepath.Join(p.BaseDir(), "store_migration_target")
}
func (p Provider) PkgDir() string {
return filepath.Join(p.DataDir(), "packages")
}
func (p Provider) CompileDir() string {
return filepath.Join(p.DataDir(), "compile")
}
func (p Provider) MonitJobsDir() string {
return filepath.Join(p.BaseDir(), "monit", "job")
}
func (p Provider) MonitDir() string {
return filepath.Join(p.BaseDir(), "monit")
}
func (p Provider) JobsDir() string {
return filepath.Join(p.BaseDir(), "jobs")
}
func (p Provider) DataJobsDir() string {
return filepath.Join(p.DataDir(), "jobs")
}
func (p Provider) JobLogDir(jobName string) string {
return filepath.Join(p.DataDir(), "sys", "log", jobName)
}
func (p Provider) JobRunDir(jobName string) string {
return filepath.Join(p.DataDir(), "sys", "run", jobName)
}
func (p Provider) JobDir(jobName string) string {
return filepath.Join(p.DataDir(), jobName)
}
func (p Provider) JobBinDir(jobName string) string {
return filepath.Join(p.JobsDir(), jobName, "bin")
}
func (p Provider) SettingsDir() string {
return filepath.Join(p.BoshDir(), "settings")
}
func (p Provider) TmpDir() string {
return filepath.Join(p.DataDir(), "tmp")
}
func (p Provider) LogsDir() string {
return filepath.Join(p.BaseDir(), "sys", "log")
}
func (p Provider) AgentLogsDir() string {
return filepath.Join(p.BaseDir(), "bosh", "log")
}
func (p Provider) InstanceDir() string {
return filepath.Join(p.BaseDir(), "instance")
}
func (p Provider) DisksDir() string {
return filepath.Join(p.InstanceDir(), "disks")
}
func (p Provider) InstanceDNSDir() string {
return filepath.Join(p.InstanceDir(), "dns")
}
func (p Provider) BlobsDir() string {
return filepath.Join(p.DataDir(), "blobs")
}
func (p Provider) SensitiveBlobsDir() string {
return filepath.Join(p.DataDir(), "sensitive_blobs")
}