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.

auth_repo.go 466 B

3 days ago
2 days ago
3 days ago
12345678910111213141516171819
  1. package repo
  2. import "egg-im/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. }