Пример #1
0
func (m *maker) make(r *http.Request) (storage tenpu.BlobStorage, meta tenpu.MetaStorage, input *tenpuInput, err error) {
	db := mgodb.NewDatabase("localhost", "tenpu_test")
	storage = gridfs.NewStorage(db)
	meta = mgometa.NewStorage(db, collectionName)
	input = &tenpuInput{}
	return
}
Пример #2
0
func (this *ImageMaker) make(r *http.Request) (storage tenpu.BlobStorage, meta tenpu.MetaStorage, input *ImageInput, err error) {
	storage = gridfs.NewStorage(global.ImageDatabase)
	meta = mgometa.NewStorage(global.ImageDatabase, IMAGES)
	input = &ImageInput{}
	return
}