You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
811 B
30 lines
811 B
package group |
|
|
|
import ( |
|
"errors" |
|
"github.com/redis/go-redis/v9" |
|
) |
|
|
|
var ErrNotExists = errors.New("not exists") |
|
|
|
// PostalDao persistent postal group api |
|
// 1.uid online, send online event |
|
// 2.onOnlineEvent: chat -> chat groups to postal, game -> game groups to postal |
|
// 2.postal create uid create or join memory group linkedList |
|
// 3.postalA: gid-1(uid1, uid2, uid3); postalB: gid1(uid4, uid5, uid6) |
|
// extra: room bit位判断是否存在 |
|
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 |
|
}
|
|
|