golang-im聊天
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

26 lines
750 B

  1. package app
  2. import (
  3. "context"
  4. "gim/internal/business/domain/user/service"
  5. )
  6. type authApp struct{}
  7. var AuthApp = new(authApp)
  8. // SignIn 长连接登录
  9. func (*authApp) SignIn(ctx context.Context, phoneNumber, code string, masterId, deviceId int64, pushAlia string) (bool, int64, string, int64, error) {
  10. return service.AuthService.SignIn(ctx, phoneNumber, code, masterId, deviceId, pushAlia)
  11. }
  12. // Auth 验证用户是否登录
  13. func (*authApp) Auth(ctx context.Context, userId, deviceId int64, token string) error {
  14. return service.AuthService.Auth(ctx, userId, deviceId, token)
  15. }
  16. // AuthMaster 验证站长权限
  17. func (*authApp) AuthMaster(ctx context.Context, masterId string) error {
  18. return service.AuthService.AuthMaster(ctx, masterId)
  19. }