Commit 1528762b by Li Feifei

update im_user proto file

parent dbd843ee
......@@ -5,10 +5,10 @@ package pb
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "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.
......@@ -22,24 +22,15 @@ func (this *ImUserRequest) Validate() error {
return github_com_mwitkow_go_proto_validators.FieldError("Common", err)
}
}
if this.Mobile == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Mobile", fmt.Errorf(`value '%v' must not be an empty string`, this.Mobile))
}
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))
if this.Accid == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Accid", fmt.Errorf(`value '%v' must not be an empty string`, this.Accid))
}
return nil
}
func (this *ImUserReply) Validate() error {
func (this *ImUserRegReply) Validate() error {
return nil
}
func (this *ImUserOutRequest) Validate() error {
func (this *ImUserLoginRequest) Validate() error {
if this.Common != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Common); err != nil {
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