2016-02-25 21:32:31 -09:00
|
|
|
package repositories
|
|
|
|
|
|
|
|
|
|
type BaseRepository struct {
|
2016-02-27 20:55:36 -09:00
|
|
|
key string
|
2016-02-25 21:32:31 -09:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2016-02-27 20:55:36 -09:00
|
|
|
func (r *BaseRepository) saveOrUpdate(id string, rec interface{}) error {
|
|
|
|
|
return hmset(r.key + "_id_" + id, rec)
|
2016-02-25 21:32:31 -09:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (r *BaseRepository) Dump() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|