243 lines
7.1 KiB
Go
243 lines
7.1 KiB
Go
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: api/account/account.proto
|
|
|
|
package account
|
|
|
|
import (
|
|
fmt "fmt"
|
|
math "math"
|
|
proto "github.com/golang/protobuf/proto"
|
|
_ "github.com/mwitkow/go-proto-validators"
|
|
regexp "regexp"
|
|
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
func (this *CommonRequest) Validate() error {
|
|
return nil
|
|
}
|
|
func (this *LoginLogsResponse) Validate() error {
|
|
for _, item := range this.Data {
|
|
if item != nil {
|
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
|
}
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (this *LoginLog) Validate() error {
|
|
return nil
|
|
}
|
|
func (this *LoginInfosByUserIdRequest) Validate() error {
|
|
return nil
|
|
}
|
|
func (this *SendNewTelNumMsgRequest) Validate() error {
|
|
if this.Domain == "" {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
|
}
|
|
return nil
|
|
}
|
|
func (this *UserByTelRequest) Validate() error {
|
|
if this.Domain == "" {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
|
}
|
|
return nil
|
|
}
|
|
func (this *CommonResponse) Validate() error {
|
|
return nil
|
|
}
|
|
func (this *UsersByTelRequest) Validate() error {
|
|
if this.Domain == "" {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
|
}
|
|
return nil
|
|
}
|
|
func (this *ListByIDsRequest) Validate() error {
|
|
if this.Domain == "" {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
|
}
|
|
return nil
|
|
}
|
|
|
|
var _regex_SendMsgRequest_TelNum = regexp.MustCompile(`^1\d{10}$`)
|
|
|
|
func (this *SendMsgRequest) Validate() error {
|
|
if this.Domain == "" {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
|
}
|
|
if !_regex_SendMsgRequest_TelNum.MatchString(this.TelNum) {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("TelNum", fmt.Errorf(`70002`))
|
|
}
|
|
return nil
|
|
}
|
|
|
|
var _regex_CheckMsgRequest_TelNum = regexp.MustCompile(`^1\d{10}$`)
|
|
|
|
func (this *CheckMsgRequest) Validate() error {
|
|
if this.Domain == "" {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
|
}
|
|
if !_regex_CheckMsgRequest_TelNum.MatchString(this.TelNum) {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("TelNum", fmt.Errorf(`70002`))
|
|
}
|
|
if this.Code == "" {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("Code", fmt.Errorf(`70003`))
|
|
}
|
|
return nil
|
|
}
|
|
func (this *SendMsgStatusResponse) Validate() error {
|
|
return nil
|
|
}
|
|
func (this *RemoveRequest) Validate() error {
|
|
if this.Domain == "" {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
|
}
|
|
if !(this.ID > 0) {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("ID", fmt.Errorf(`70004`))
|
|
}
|
|
return nil
|
|
}
|
|
func (this *RemoveResponse) Validate() error {
|
|
return nil
|
|
}
|
|
func (this *UpdateRequest) Validate() error {
|
|
if this.Domain == "" {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
|
}
|
|
if this.Extend != nil {
|
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Extend); err != nil {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("Extend", err)
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (this *UpdateResponse) Validate() error {
|
|
return nil
|
|
}
|
|
func (this *PrivacyInfoRequest) Validate() error {
|
|
if this.Domain == "" {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
|
}
|
|
return nil
|
|
}
|
|
func (this *ListRequest) Validate() error {
|
|
if this.Domain == "" {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
|
}
|
|
return nil
|
|
}
|
|
func (this *ListResponse) Validate() error {
|
|
for _, item := range this.Data {
|
|
if item != nil {
|
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
|
}
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (this *InfoRequest) Validate() error {
|
|
if this.Domain == "" {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
|
}
|
|
return nil
|
|
}
|
|
func (this *InfoResponse) Validate() error {
|
|
if this.Info != nil {
|
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Info); err != nil {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("Info", err)
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (this *DecryptJwtResponse) Validate() error {
|
|
return nil
|
|
}
|
|
func (this *DecryptJwtRequest) Validate() error {
|
|
return nil
|
|
}
|
|
func (this *CheckPwdRequest) Validate() error {
|
|
return nil
|
|
}
|
|
func (this *AuthenticationRequest) Validate() error {
|
|
if !(len(this.IDNum) == 18) {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("IDNum", fmt.Errorf(`70006`))
|
|
}
|
|
return nil
|
|
}
|
|
func (this *RequestStatus) Validate() error {
|
|
return nil
|
|
}
|
|
|
|
var _regex_RegistRequest_TelNum = regexp.MustCompile(`^1\d{10}$`)
|
|
|
|
func (this *RegistRequest) Validate() error {
|
|
if this.Domain == "" {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
|
}
|
|
if this.NickName == "" {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("NickName", fmt.Errorf(`70005`))
|
|
}
|
|
if !(len(this.NickName) < 20) {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("NickName", fmt.Errorf(`70005`))
|
|
}
|
|
if !_regex_RegistRequest_TelNum.MatchString(this.TelNum) {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("TelNum", fmt.Errorf(`70002`))
|
|
}
|
|
if !(len(this.Password) > 5) {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("Password", fmt.Errorf(`70007`))
|
|
}
|
|
if this.Extend != nil {
|
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Extend); err != nil {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("Extend", err)
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
|
|
var _regex_LoginRequest_TelNum = regexp.MustCompile(`^1\d{10}$`)
|
|
|
|
func (this *LoginRequest) Validate() error {
|
|
if this.Domain == "" {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
|
|
}
|
|
if !_regex_LoginRequest_TelNum.MatchString(this.TelNum) {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("TelNum", fmt.Errorf(`70002`))
|
|
}
|
|
return nil
|
|
}
|
|
func (this *TokenInfo) Validate() error {
|
|
if this.AccountInfo != nil {
|
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.AccountInfo); err != nil {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("AccountInfo", err)
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
func (this *Extend) Validate() error {
|
|
return nil
|
|
}
|
|
func (this *Department) Validate() error {
|
|
return nil
|
|
}
|
|
func (this *AccountInfo) Validate() error {
|
|
if this.Extend != nil {
|
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Extend); err != nil {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("Extend", err)
|
|
}
|
|
}
|
|
for _, item := range this.Departments {
|
|
if item != nil {
|
|
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
|
return github_com_mwitkow_go_proto_validators.FieldError("Departments", err)
|
|
}
|
|
}
|
|
}
|
|
return nil
|
|
}
|