Example #1
0
func New() (sysstorage ares.SystemStorage, err error) {
	ss := new(storage)
	ss.helper = leveldbhelper.Helper()
	ss.database, err = ss.helper.LevelDb(levelDbTypeName, 0)
	if err != nil {
		return
	}
	sysstorage = ss
	return
}
Example #2
0
func newBase() (instance *base, err error) {
	instance = new(base)
	instance.LevelDbHelper = leveldbhelper.Helper()
	instance.createBucketIdMutex = new(sync.Mutex)
	instance.createDatabase, err = instance.LevelDbHelper.LevelDb(leveldbTypeName_create, 0)
	if err != nil {
		return
	}
	instance.settingsDatabase, err = instance.LevelDbHelper.LevelDb(leveldbTypeName_settings, 0)
	if err != nil {
		return
	}
	return instance, nil
}
Example #3
0
func New() minos.BucketType {
	str := new(directoryBucket)
	str.database = leveldbhelper.Helper()
	return str
}
Example #4
0
func New() minos.BucketType {
	str := new(notifier)
	str.database = leveldbhelper.Helper()
	return str
}
Example #5
0
func New() minos.BucketType {
	str := new(metadataStruct)
	str.database = leveldbhelper.Helper()
	return str
}