9 changed files with 95 additions and 18 deletions
@ -0,0 +1,25 @@ |
|||||||
|
package dao |
||||||
|
|
||||||
|
import ( |
||||||
|
"errors" |
||||||
|
"github.com/redis/go-redis/v9" |
||||||
|
) |
||||||
|
|
||||||
|
var ErrNotExists = errors.New("not exists") |
||||||
|
|
||||||
|
// PostalDao persistent postal group api
|
||||||
|
type PostalDao interface { |
||||||
|
LoadGroupIdsByUid(uid string) ([]string, error) |
||||||
|
GroupCreate(gid string) (string, error) |
||||||
|
GroupJoin(gid, uid string) error |
||||||
|
GroupLeave(gid, uid string) error |
||||||
|
GroupDismiss(gid string) error |
||||||
|
} |
||||||
|
|
||||||
|
type RedisPostalDao struct { |
||||||
|
rdb *redis.Client |
||||||
|
} |
||||||
|
|
||||||
|
func (d *RedisPostalDao) LoadGroupIdsByUid(uid string) (gids []string, err error) { |
||||||
|
return |
||||||
|
} |
||||||
Loading…
Reference in new issue