Пример #1
0
func newFileRepoIndicies(dir string, fs boshsys.FileSystem) repoIndicies {
	return repoIndicies{
		releasesIndex:        bpindex.NewFileIndex(filepath.Join(dir, "releases.json"), fs),
		releaseNotesIndex:    bpindex.NewFileIndex(filepath.Join(dir, "release_notes.json"), fs),
		releaseTarsIndex:     bpindex.NewFileIndex(filepath.Join(dir, "release_tarballs.json"), fs),
		releaseVersionsIndex: bpindex.NewFileIndex(filepath.Join(dir, "release_versions.json"), fs),
		jobsIndex:            bpindex.NewFileIndex(filepath.Join(dir, "jobs.json"), fs),

		s3StemcellsIndex:    bpindex.NewFileIndex(filepath.Join(dir, "s3_stemcells.json"), fs),
		s3BoshInitBinsIndex: bpindex.NewFileIndex(filepath.Join(dir, "s3_bosh_init_bins.json"), fs),

		importsIndex:    bpindex.NewFileIndex(filepath.Join(dir, "imports.json"), fs),
		importErrsIndex: bpindex.NewFileIndex(filepath.Join(dir, "import_errs.json"), fs),
		watchersIndex:   bpindex.NewFileIndex(filepath.Join(dir, "watchers.json"), fs),
	}
}
func (f ReposFactory) newIndex(name string) bpindex.Index {
	return bpindex.NewFileIndex(filepath.Join(f.dirPath, name+".json"), f.fs)
}