quintodrome/repositories/base_repository.go

20 lines
292 B
Go
Raw Normal View History

package repositories
type BaseRepository struct {
2016-02-27 20:55:36 -09:00
key string
}
2016-02-27 20:55:36 -09:00
func (r *BaseRepository) saveOrUpdate(id string, rec interface{}) error {
2016-02-27 22:56:41 -09:00
return saveStruct(r.key, id, rec)
}
func (r *BaseRepository) CountAll() (int, error) {
return count(r.key)
}
func (r *BaseRepository) Dump() {
}