golang-im聊天
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

20 行
463 B

  1. package repo
  2. import "gim/internal/business/domain/user/model"
  3. type authRepo struct{}
  4. var AuthRepo = new(authRepo)
  5. func (*authRepo) Get(userId, deviceId int64) (*model.Device, error) {
  6. return AuthCache.Get(userId, deviceId)
  7. }
  8. func (*authRepo) Set(userId, deviceId int64, device model.Device) error {
  9. return AuthCache.Set(userId, deviceId, device)
  10. }
  11. func (*authRepo) GetAll(userId int64) (map[int64]model.Device, error) {
  12. return AuthCache.GetAll(userId)
  13. }