golang-im聊天
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.
 
 
 
 

20 lines
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. }