Commit 1528762b by Li Feifei

update im_user proto file

parent dbd843ee
...@@ -5,10 +5,10 @@ package pb ...@@ -5,10 +5,10 @@ package pb
import ( import (
fmt "fmt" fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto" proto "github.com/golang/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators" _ "github.com/mwitkow/go-proto-validators"
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators" github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
math "math"
) )
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
...@@ -22,24 +22,15 @@ func (this *ImUserRequest) Validate() error { ...@@ -22,24 +22,15 @@ func (this *ImUserRequest) Validate() error {
return github_com_mwitkow_go_proto_validators.FieldError("Common", err) return github_com_mwitkow_go_proto_validators.FieldError("Common", err)
} }
} }
if this.Mobile == "" { if this.Accid == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Mobile", fmt.Errorf(`value '%v' must not be an empty string`, this.Mobile)) return github_com_mwitkow_go_proto_validators.FieldError("Accid", fmt.Errorf(`value '%v' must not be an empty string`, this.Accid))
}
if !(len(this.Mobile) == 11) {
return github_com_mwitkow_go_proto_validators.FieldError("Mobile", fmt.Errorf(`value '%v' must have a length equal to '11'`, this.Mobile))
}
if this.Code == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Code", fmt.Errorf(`value '%v' must not be an empty string`, this.Code))
}
if this.Platform == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Platform", fmt.Errorf(`value '%v' must not be an empty string`, this.Platform))
} }
return nil return nil
} }
func (this *ImUserReply) Validate() error { func (this *ImUserRegReply) Validate() error {
return nil return nil
} }
func (this *ImUserOutRequest) Validate() error { func (this *ImUserLoginRequest) Validate() error {
if this.Common != nil { if this.Common != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Common); err != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Common); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Common", err) return github_com_mwitkow_go_proto_validators.FieldError("Common", err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment