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.
Open-IM-Server/pkg/proto/auth/auth.go

31 lines
642 B

package auth
import "github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
func (x *UserTokenReq) Check() error {
if x.UserID == "" {
return errs.ErrArgs.Wrap("userID is empty")
}
if x.PlatformID > 9 || x.PlatformID < 1 {
return errs.ErrArgs.Wrap("platform is invalidate")
}
return nil
}
func (x *ForceLogoutReq) Check() error {
if x.UserID == "" {
return errs.ErrArgs.Wrap("userID is empty")
}
if x.PlatformID > 9 || x.PlatformID < 1 {
return errs.ErrArgs.Wrap("platformID is invalidate")
}
return nil
}
func (x *ParseTokenReq) Check() error {
if x.Token == "" {
return errs.ErrArgs.Wrap("userID is empty")
}
return nil
}