Started the implementation of getMusicDirectory. Probably will need to introduce a new 'service' layer...

This commit is contained in:
Deluan
2016-03-02 20:00:55 -05:00
parent 68786d4b39
commit 9577d9ae87
15 changed files with 166 additions and 16 deletions
+5
View File
@@ -39,6 +39,11 @@ func (r *baseRepository) CountAll() (int, error) {
return len(ids), err
}
func (r *baseRepository) Exists(id string) (bool, error) {
res, err := db().SIsMember([]byte(r.table + "s:all"), []byte(id))
return res != 0, err
}
func (r *baseRepository) saveOrUpdate(id string, entity interface{}) error {
recordPrefix := fmt.Sprintf("%s:%s:", r.table, id)
allKey := r.table + "s:all"