| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674 |
- // Copyright 2025 Kuban Technologies
- //
- // 业务规则库 - 针对中国业务场景的预定义验证规则
- // 提供开箱即用的常用业务验证
- // Code generated by protoc-gen-go. DO NOT EDIT.
- // versions:
- // protoc-gen-go v1.36.6-modify
- // protoc v6.31.1
- // source: kuban/api/validate/business_rules.proto
- package validate
- import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
- _ "google.golang.org/protobuf/types/descriptorpb"
- reflect "reflect"
- sync "sync"
- unsafe "unsafe"
- )
- const (
- // Verify that this generated code is sufficiently up-to-date.
- _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
- // Verify that runtime/protoimpl is sufficiently up-to-date.
- _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
- )
- // 手机运营商枚举
- type MobileOperator int32
- const (
- MobileOperator_MOBILE_OPERATOR_UNSPECIFIED MobileOperator = 0
- MobileOperator_MOBILE_OPERATOR_CHINA_MOBILE MobileOperator = 1 // 中国移动
- MobileOperator_MOBILE_OPERATOR_CHINA_UNICOM MobileOperator = 2 // 中国联通
- MobileOperator_MOBILE_OPERATOR_CHINA_TELECOM MobileOperator = 3 // 中国电信
- MobileOperator_MOBILE_OPERATOR_CHINA_BROADNET MobileOperator = 4 // 中国广电
- )
- // Enum value maps for MobileOperator.
- var (
- MobileOperator_name = map[int32]string{
- 0: "MOBILE_OPERATOR_UNSPECIFIED",
- 1: "MOBILE_OPERATOR_CHINA_MOBILE",
- 2: "MOBILE_OPERATOR_CHINA_UNICOM",
- 3: "MOBILE_OPERATOR_CHINA_TELECOM",
- 4: "MOBILE_OPERATOR_CHINA_BROADNET",
- }
- MobileOperator_value = map[string]int32{
- "MOBILE_OPERATOR_UNSPECIFIED": 0,
- "MOBILE_OPERATOR_CHINA_MOBILE": 1,
- "MOBILE_OPERATOR_CHINA_UNICOM": 2,
- "MOBILE_OPERATOR_CHINA_TELECOM": 3,
- "MOBILE_OPERATOR_CHINA_BROADNET": 4,
- }
- )
- func (x MobileOperator) Enum() *MobileOperator {
- p := new(MobileOperator)
- *p = x
- return p
- }
- func (x MobileOperator) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
- }
- func (MobileOperator) Descriptor() protoreflect.EnumDescriptor {
- return file_kuban_api_validate_business_rules_proto_enumTypes[0].Descriptor()
- }
- func (MobileOperator) Type() protoreflect.EnumType {
- return &file_kuban_api_validate_business_rules_proto_enumTypes[0]
- }
- func (x MobileOperator) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
- }
- // Deprecated: Use MobileOperator.Descriptor instead.
- func (MobileOperator) EnumDescriptor() ([]byte, []int) {
- return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{0}
- }
- // 身份证类型
- type IdCardType int32
- const (
- IdCardType_ID_CARD_TYPE_UNSPECIFIED IdCardType = 0
- IdCardType_ID_CARD_TYPE_18_DIGIT IdCardType = 1 // 18位身份证
- IdCardType_ID_CARD_TYPE_15_DIGIT IdCardType = 2 // 15位身份证(旧版)
- )
- // Enum value maps for IdCardType.
- var (
- IdCardType_name = map[int32]string{
- 0: "ID_CARD_TYPE_UNSPECIFIED",
- 1: "ID_CARD_TYPE_18_DIGIT",
- 2: "ID_CARD_TYPE_15_DIGIT",
- }
- IdCardType_value = map[string]int32{
- "ID_CARD_TYPE_UNSPECIFIED": 0,
- "ID_CARD_TYPE_18_DIGIT": 1,
- "ID_CARD_TYPE_15_DIGIT": 2,
- }
- )
- func (x IdCardType) Enum() *IdCardType {
- p := new(IdCardType)
- *p = x
- return p
- }
- func (x IdCardType) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
- }
- func (IdCardType) Descriptor() protoreflect.EnumDescriptor {
- return file_kuban_api_validate_business_rules_proto_enumTypes[1].Descriptor()
- }
- func (IdCardType) Type() protoreflect.EnumType {
- return &file_kuban_api_validate_business_rules_proto_enumTypes[1]
- }
- func (x IdCardType) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
- }
- // Deprecated: Use IdCardType.Descriptor instead.
- func (IdCardType) EnumDescriptor() ([]byte, []int) {
- return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{1}
- }
- // 性别枚举
- type Gender int32
- const (
- Gender_GENDER_UNSPECIFIED Gender = 0
- Gender_GENDER_MALE Gender = 1 // 男性
- Gender_GENDER_FEMALE Gender = 2 // 女性
- )
- // Enum value maps for Gender.
- var (
- Gender_name = map[int32]string{
- 0: "GENDER_UNSPECIFIED",
- 1: "GENDER_MALE",
- 2: "GENDER_FEMALE",
- }
- Gender_value = map[string]int32{
- "GENDER_UNSPECIFIED": 0,
- "GENDER_MALE": 1,
- "GENDER_FEMALE": 2,
- }
- )
- func (x Gender) Enum() *Gender {
- p := new(Gender)
- *p = x
- return p
- }
- func (x Gender) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
- }
- func (Gender) Descriptor() protoreflect.EnumDescriptor {
- return file_kuban_api_validate_business_rules_proto_enumTypes[2].Descriptor()
- }
- func (Gender) Type() protoreflect.EnumType {
- return &file_kuban_api_validate_business_rules_proto_enumTypes[2]
- }
- func (x Gender) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
- }
- // Deprecated: Use Gender.Descriptor instead.
- func (Gender) EnumDescriptor() ([]byte, []int) {
- return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{2}
- }
- // 机构类型
- type OrganizationType int32
- const (
- OrganizationType_ORGANIZATION_TYPE_UNSPECIFIED OrganizationType = 0
- OrganizationType_ORGANIZATION_TYPE_ENTERPRISE OrganizationType = 1 // 企业
- OrganizationType_ORGANIZATION_TYPE_INSTITUTION OrganizationType = 2 // 事业单位
- OrganizationType_ORGANIZATION_TYPE_SOCIAL_GROUP OrganizationType = 3 // 社会团体
- OrganizationType_ORGANIZATION_TYPE_GOVERNMENT OrganizationType = 9 // 机关
- )
- // Enum value maps for OrganizationType.
- var (
- OrganizationType_name = map[int32]string{
- 0: "ORGANIZATION_TYPE_UNSPECIFIED",
- 1: "ORGANIZATION_TYPE_ENTERPRISE",
- 2: "ORGANIZATION_TYPE_INSTITUTION",
- 3: "ORGANIZATION_TYPE_SOCIAL_GROUP",
- 9: "ORGANIZATION_TYPE_GOVERNMENT",
- }
- OrganizationType_value = map[string]int32{
- "ORGANIZATION_TYPE_UNSPECIFIED": 0,
- "ORGANIZATION_TYPE_ENTERPRISE": 1,
- "ORGANIZATION_TYPE_INSTITUTION": 2,
- "ORGANIZATION_TYPE_SOCIAL_GROUP": 3,
- "ORGANIZATION_TYPE_GOVERNMENT": 9,
- }
- )
- func (x OrganizationType) Enum() *OrganizationType {
- p := new(OrganizationType)
- *p = x
- return p
- }
- func (x OrganizationType) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
- }
- func (OrganizationType) Descriptor() protoreflect.EnumDescriptor {
- return file_kuban_api_validate_business_rules_proto_enumTypes[3].Descriptor()
- }
- func (OrganizationType) Type() protoreflect.EnumType {
- return &file_kuban_api_validate_business_rules_proto_enumTypes[3]
- }
- func (x OrganizationType) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
- }
- // Deprecated: Use OrganizationType.Descriptor instead.
- func (OrganizationType) EnumDescriptor() ([]byte, []int) {
- return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{3}
- }
- // 银行卡类型
- type BankCardType int32
- const (
- BankCardType_BANK_CARD_TYPE_UNSPECIFIED BankCardType = 0
- BankCardType_BANK_CARD_TYPE_DEBIT BankCardType = 1 // 借记卡
- BankCardType_BANK_CARD_TYPE_CREDIT BankCardType = 2 // 信用卡
- )
- // Enum value maps for BankCardType.
- var (
- BankCardType_name = map[int32]string{
- 0: "BANK_CARD_TYPE_UNSPECIFIED",
- 1: "BANK_CARD_TYPE_DEBIT",
- 2: "BANK_CARD_TYPE_CREDIT",
- }
- BankCardType_value = map[string]int32{
- "BANK_CARD_TYPE_UNSPECIFIED": 0,
- "BANK_CARD_TYPE_DEBIT": 1,
- "BANK_CARD_TYPE_CREDIT": 2,
- }
- )
- func (x BankCardType) Enum() *BankCardType {
- p := new(BankCardType)
- *p = x
- return p
- }
- func (x BankCardType) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
- }
- func (BankCardType) Descriptor() protoreflect.EnumDescriptor {
- return file_kuban_api_validate_business_rules_proto_enumTypes[4].Descriptor()
- }
- func (BankCardType) Type() protoreflect.EnumType {
- return &file_kuban_api_validate_business_rules_proto_enumTypes[4]
- }
- func (x BankCardType) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
- }
- // Deprecated: Use BankCardType.Descriptor instead.
- func (BankCardType) EnumDescriptor() ([]byte, []int) {
- return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{4}
- }
- // 中国手机号验证规则
- type ChineseMobileRules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 是否启用验证
- Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled"`
- // 允许的运营商
- AllowedOperators []MobileOperator `protobuf:"varint,2,rep,packed,name=allowed_operators,json=allowedOperators,proto3,enum=kuban.api.validate.MobileOperator" json:"allowed_operators"`
- // 是否允许虚拟运营商号码
- AllowVirtual bool `protobuf:"varint,3,opt,name=allow_virtual,json=allowVirtual,proto3" json:"allow_virtual"`
- // 自定义错误消息
- ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *ChineseMobileRules) Reset() {
- *x = ChineseMobileRules{}
- mi := &file_kuban_api_validate_business_rules_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *ChineseMobileRules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*ChineseMobileRules) ProtoMessage() {}
- func (x *ChineseMobileRules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_business_rules_proto_msgTypes[0]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use ChineseMobileRules.ProtoReflect.Descriptor instead.
- func (*ChineseMobileRules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{0}
- }
- func (x *ChineseMobileRules) GetEnabled() bool {
- if x != nil {
- return x.Enabled
- }
- return false
- }
- func (x *ChineseMobileRules) GetAllowedOperators() []MobileOperator {
- if x != nil {
- return x.AllowedOperators
- }
- return nil
- }
- func (x *ChineseMobileRules) GetAllowVirtual() bool {
- if x != nil {
- return x.AllowVirtual
- }
- return false
- }
- func (x *ChineseMobileRules) GetErrorMessage() string {
- if x != nil {
- return x.ErrorMessage
- }
- return ""
- }
- // 中国身份证验证规则
- type ChineseIdCardRules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 是否启用验证
- Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled"`
- // 是否验证校验位
- VerifyChecksum bool `protobuf:"varint,2,opt,name=verify_checksum,json=verifyChecksum,proto3" json:"verify_checksum"`
- // 是否验证出生日期有效性
- VerifyBirthDate bool `protobuf:"varint,3,opt,name=verify_birth_date,json=verifyBirthDate,proto3" json:"verify_birth_date"`
- // 是否验证地区码有效性
- VerifyAreaCode bool `protobuf:"varint,4,opt,name=verify_area_code,json=verifyAreaCode,proto3" json:"verify_area_code"`
- // 允许的身份证类型
- AllowedTypes []IdCardType `protobuf:"varint,5,rep,packed,name=allowed_types,json=allowedTypes,proto3,enum=kuban.api.validate.IdCardType" json:"allowed_types"`
- // 年龄范围限制
- MinAge *int32 `protobuf:"varint,6,opt,name=min_age,json=minAge,proto3,oneof" json:"min_age"`
- MaxAge *int32 `protobuf:"varint,7,opt,name=max_age,json=maxAge,proto3,oneof" json:"max_age"`
- // 性别限制
- RequiredGender *Gender `protobuf:"varint,8,opt,name=required_gender,json=requiredGender,proto3,enum=kuban.api.validate.Gender,oneof" json:"required_gender"`
- // 自定义错误消息
- ErrorMessage string `protobuf:"bytes,9,opt,name=error_message,json=errorMessage,proto3" json:"error_message"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *ChineseIdCardRules) Reset() {
- *x = ChineseIdCardRules{}
- mi := &file_kuban_api_validate_business_rules_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *ChineseIdCardRules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*ChineseIdCardRules) ProtoMessage() {}
- func (x *ChineseIdCardRules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_business_rules_proto_msgTypes[1]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use ChineseIdCardRules.ProtoReflect.Descriptor instead.
- func (*ChineseIdCardRules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{1}
- }
- func (x *ChineseIdCardRules) GetEnabled() bool {
- if x != nil {
- return x.Enabled
- }
- return false
- }
- func (x *ChineseIdCardRules) GetVerifyChecksum() bool {
- if x != nil {
- return x.VerifyChecksum
- }
- return false
- }
- func (x *ChineseIdCardRules) GetVerifyBirthDate() bool {
- if x != nil {
- return x.VerifyBirthDate
- }
- return false
- }
- func (x *ChineseIdCardRules) GetVerifyAreaCode() bool {
- if x != nil {
- return x.VerifyAreaCode
- }
- return false
- }
- func (x *ChineseIdCardRules) GetAllowedTypes() []IdCardType {
- if x != nil {
- return x.AllowedTypes
- }
- return nil
- }
- func (x *ChineseIdCardRules) GetMinAge() int32 {
- if x != nil && x.MinAge != nil {
- return *x.MinAge
- }
- return 0
- }
- func (x *ChineseIdCardRules) GetMaxAge() int32 {
- if x != nil && x.MaxAge != nil {
- return *x.MaxAge
- }
- return 0
- }
- func (x *ChineseIdCardRules) GetRequiredGender() Gender {
- if x != nil && x.RequiredGender != nil {
- return *x.RequiredGender
- }
- return Gender_GENDER_UNSPECIFIED
- }
- func (x *ChineseIdCardRules) GetErrorMessage() string {
- if x != nil {
- return x.ErrorMessage
- }
- return ""
- }
- // 统一社会信用代码验证规则
- type UnifiedSocialCreditCodeRules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 是否启用验证
- Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled"`
- // 是否验证校验位
- VerifyChecksum bool `protobuf:"varint,2,opt,name=verify_checksum,json=verifyChecksum,proto3" json:"verify_checksum"`
- // 允许的机构类型
- AllowedTypes []OrganizationType `protobuf:"varint,3,rep,packed,name=allowed_types,json=allowedTypes,proto3,enum=kuban.api.validate.OrganizationType" json:"allowed_types"`
- // 自定义错误消息
- ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *UnifiedSocialCreditCodeRules) Reset() {
- *x = UnifiedSocialCreditCodeRules{}
- mi := &file_kuban_api_validate_business_rules_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *UnifiedSocialCreditCodeRules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*UnifiedSocialCreditCodeRules) ProtoMessage() {}
- func (x *UnifiedSocialCreditCodeRules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_business_rules_proto_msgTypes[2]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use UnifiedSocialCreditCodeRules.ProtoReflect.Descriptor instead.
- func (*UnifiedSocialCreditCodeRules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{2}
- }
- func (x *UnifiedSocialCreditCodeRules) GetEnabled() bool {
- if x != nil {
- return x.Enabled
- }
- return false
- }
- func (x *UnifiedSocialCreditCodeRules) GetVerifyChecksum() bool {
- if x != nil {
- return x.VerifyChecksum
- }
- return false
- }
- func (x *UnifiedSocialCreditCodeRules) GetAllowedTypes() []OrganizationType {
- if x != nil {
- return x.AllowedTypes
- }
- return nil
- }
- func (x *UnifiedSocialCreditCodeRules) GetErrorMessage() string {
- if x != nil {
- return x.ErrorMessage
- }
- return ""
- }
- // 银行卡号验证规则
- type BankCardRules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 是否启用验证
- Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled"`
- // 是否使用 Luhn 算法验证
- VerifyLuhn bool `protobuf:"varint,2,opt,name=verify_luhn,json=verifyLuhn,proto3" json:"verify_luhn"`
- // 允许的卡类型
- AllowedTypes []BankCardType `protobuf:"varint,3,rep,packed,name=allowed_types,json=allowedTypes,proto3,enum=kuban.api.validate.BankCardType" json:"allowed_types"`
- // 允许的银行
- AllowedBanks []string `protobuf:"bytes,4,rep,name=allowed_banks,json=allowedBanks,proto3" json:"allowed_banks"` // 银行代码列表
- // 自定义错误消息
- ErrorMessage string `protobuf:"bytes,5,opt,name=error_message,json=errorMessage,proto3" json:"error_message"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *BankCardRules) Reset() {
- *x = BankCardRules{}
- mi := &file_kuban_api_validate_business_rules_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *BankCardRules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*BankCardRules) ProtoMessage() {}
- func (x *BankCardRules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_business_rules_proto_msgTypes[3]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use BankCardRules.ProtoReflect.Descriptor instead.
- func (*BankCardRules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{3}
- }
- func (x *BankCardRules) GetEnabled() bool {
- if x != nil {
- return x.Enabled
- }
- return false
- }
- func (x *BankCardRules) GetVerifyLuhn() bool {
- if x != nil {
- return x.VerifyLuhn
- }
- return false
- }
- func (x *BankCardRules) GetAllowedTypes() []BankCardType {
- if x != nil {
- return x.AllowedTypes
- }
- return nil
- }
- func (x *BankCardRules) GetAllowedBanks() []string {
- if x != nil {
- return x.AllowedBanks
- }
- return nil
- }
- func (x *BankCardRules) GetErrorMessage() string {
- if x != nil {
- return x.ErrorMessage
- }
- return ""
- }
- // 中文姓名验证规则
- type ChineseNameRules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 是否启用验证
- Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled"`
- // 最小长度(字符数)
- MinLength *uint32 `protobuf:"varint,2,opt,name=min_length,json=minLength,proto3,oneof" json:"min_length"`
- // 最大长度(字符数)
- MaxLength *uint32 `protobuf:"varint,3,opt,name=max_length,json=maxLength,proto3,oneof" json:"max_length"`
- // 是否允许少数民族姓名(可能包含·等特殊字符)
- AllowEthnicMinority bool `protobuf:"varint,4,opt,name=allow_ethnic_minority,json=allowEthnicMinority,proto3" json:"allow_ethnic_minority"`
- // 是否允许英文名
- AllowEnglish bool `protobuf:"varint,5,opt,name=allow_english,json=allowEnglish,proto3" json:"allow_english"`
- // 自定义错误消息
- ErrorMessage string `protobuf:"bytes,6,opt,name=error_message,json=errorMessage,proto3" json:"error_message"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *ChineseNameRules) Reset() {
- *x = ChineseNameRules{}
- mi := &file_kuban_api_validate_business_rules_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *ChineseNameRules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*ChineseNameRules) ProtoMessage() {}
- func (x *ChineseNameRules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_business_rules_proto_msgTypes[4]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use ChineseNameRules.ProtoReflect.Descriptor instead.
- func (*ChineseNameRules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{4}
- }
- func (x *ChineseNameRules) GetEnabled() bool {
- if x != nil {
- return x.Enabled
- }
- return false
- }
- func (x *ChineseNameRules) GetMinLength() uint32 {
- if x != nil && x.MinLength != nil {
- return *x.MinLength
- }
- return 0
- }
- func (x *ChineseNameRules) GetMaxLength() uint32 {
- if x != nil && x.MaxLength != nil {
- return *x.MaxLength
- }
- return 0
- }
- func (x *ChineseNameRules) GetAllowEthnicMinority() bool {
- if x != nil {
- return x.AllowEthnicMinority
- }
- return false
- }
- func (x *ChineseNameRules) GetAllowEnglish() bool {
- if x != nil {
- return x.AllowEnglish
- }
- return false
- }
- func (x *ChineseNameRules) GetErrorMessage() string {
- if x != nil {
- return x.ErrorMessage
- }
- return ""
- }
- // 邮政编码验证规则
- type PostcodeRules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 是否启用验证
- Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled"`
- // 国家/地区代码(默认为中国 CN)
- CountryCode string `protobuf:"bytes,2,opt,name=country_code,json=countryCode,proto3" json:"country_code"`
- // 允许的省份代码(中国邮编前两位)
- AllowedProvinces []string `protobuf:"bytes,3,rep,name=allowed_provinces,json=allowedProvinces,proto3" json:"allowed_provinces"`
- // 自定义错误消息
- ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *PostcodeRules) Reset() {
- *x = PostcodeRules{}
- mi := &file_kuban_api_validate_business_rules_proto_msgTypes[5]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *PostcodeRules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*PostcodeRules) ProtoMessage() {}
- func (x *PostcodeRules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_business_rules_proto_msgTypes[5]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use PostcodeRules.ProtoReflect.Descriptor instead.
- func (*PostcodeRules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{5}
- }
- func (x *PostcodeRules) GetEnabled() bool {
- if x != nil {
- return x.Enabled
- }
- return false
- }
- func (x *PostcodeRules) GetCountryCode() string {
- if x != nil {
- return x.CountryCode
- }
- return ""
- }
- func (x *PostcodeRules) GetAllowedProvinces() []string {
- if x != nil {
- return x.AllowedProvinces
- }
- return nil
- }
- func (x *PostcodeRules) GetErrorMessage() string {
- if x != nil {
- return x.ErrorMessage
- }
- return ""
- }
- // 用户注册验证规则
- type UserRegistrationRules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 用户名规则
- Username *StringRules `protobuf:"bytes,1,opt,name=username,proto3" json:"username"`
- // 手机号规则
- Mobile *ChineseMobileRules `protobuf:"bytes,2,opt,name=mobile,proto3" json:"mobile"`
- // 邮箱规则
- Email *StringRules `protobuf:"bytes,3,opt,name=email,proto3" json:"email"`
- // 密码规则
- Password *PasswordRules `protobuf:"bytes,4,opt,name=password,proto3" json:"password"`
- // 真实姓名规则(可选)
- RealName *ChineseNameRules `protobuf:"bytes,5,opt,name=real_name,json=realName,proto3" json:"real_name"`
- // 身份证规则(可选)
- IdCard *ChineseIdCardRules `protobuf:"bytes,6,opt,name=id_card,json=idCard,proto3" json:"id_card"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *UserRegistrationRules) Reset() {
- *x = UserRegistrationRules{}
- mi := &file_kuban_api_validate_business_rules_proto_msgTypes[6]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *UserRegistrationRules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*UserRegistrationRules) ProtoMessage() {}
- func (x *UserRegistrationRules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_business_rules_proto_msgTypes[6]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use UserRegistrationRules.ProtoReflect.Descriptor instead.
- func (*UserRegistrationRules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{6}
- }
- func (x *UserRegistrationRules) GetUsername() *StringRules {
- if x != nil {
- return x.Username
- }
- return nil
- }
- func (x *UserRegistrationRules) GetMobile() *ChineseMobileRules {
- if x != nil {
- return x.Mobile
- }
- return nil
- }
- func (x *UserRegistrationRules) GetEmail() *StringRules {
- if x != nil {
- return x.Email
- }
- return nil
- }
- func (x *UserRegistrationRules) GetPassword() *PasswordRules {
- if x != nil {
- return x.Password
- }
- return nil
- }
- func (x *UserRegistrationRules) GetRealName() *ChineseNameRules {
- if x != nil {
- return x.RealName
- }
- return nil
- }
- func (x *UserRegistrationRules) GetIdCard() *ChineseIdCardRules {
- if x != nil {
- return x.IdCard
- }
- return nil
- }
- // 密码强度验证规则
- type PasswordRules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 最小长度
- MinLength uint32 `protobuf:"varint,1,opt,name=min_length,json=minLength,proto3" json:"min_length"`
- // 最大长度
- MaxLength uint32 `protobuf:"varint,2,opt,name=max_length,json=maxLength,proto3" json:"max_length"`
- // 是否要求包含大写字母
- RequireUppercase bool `protobuf:"varint,3,opt,name=require_uppercase,json=requireUppercase,proto3" json:"require_uppercase"`
- // 是否要求包含小写字母
- RequireLowercase bool `protobuf:"varint,4,opt,name=require_lowercase,json=requireLowercase,proto3" json:"require_lowercase"`
- // 是否要求包含数字
- RequireDigit bool `protobuf:"varint,5,opt,name=require_digit,json=requireDigit,proto3" json:"require_digit"`
- // 是否要求包含特殊字符
- RequireSpecial bool `protobuf:"varint,6,opt,name=require_special,json=requireSpecial,proto3" json:"require_special"`
- // 特殊字符集合(默认: !@#$%^&*()_+-=[]{}|;:,.<>?)
- SpecialChars string `protobuf:"bytes,7,opt,name=special_chars,json=specialChars,proto3" json:"special_chars"`
- // 是否禁止常见弱密码
- RejectCommonWeak bool `protobuf:"varint,8,opt,name=reject_common_weak,json=rejectCommonWeak,proto3" json:"reject_common_weak"`
- // 自定义错误消息
- ErrorMessage string `protobuf:"bytes,9,opt,name=error_message,json=errorMessage,proto3" json:"error_message"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *PasswordRules) Reset() {
- *x = PasswordRules{}
- mi := &file_kuban_api_validate_business_rules_proto_msgTypes[7]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *PasswordRules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*PasswordRules) ProtoMessage() {}
- func (x *PasswordRules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_business_rules_proto_msgTypes[7]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use PasswordRules.ProtoReflect.Descriptor instead.
- func (*PasswordRules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{7}
- }
- func (x *PasswordRules) GetMinLength() uint32 {
- if x != nil {
- return x.MinLength
- }
- return 0
- }
- func (x *PasswordRules) GetMaxLength() uint32 {
- if x != nil {
- return x.MaxLength
- }
- return 0
- }
- func (x *PasswordRules) GetRequireUppercase() bool {
- if x != nil {
- return x.RequireUppercase
- }
- return false
- }
- func (x *PasswordRules) GetRequireLowercase() bool {
- if x != nil {
- return x.RequireLowercase
- }
- return false
- }
- func (x *PasswordRules) GetRequireDigit() bool {
- if x != nil {
- return x.RequireDigit
- }
- return false
- }
- func (x *PasswordRules) GetRequireSpecial() bool {
- if x != nil {
- return x.RequireSpecial
- }
- return false
- }
- func (x *PasswordRules) GetSpecialChars() string {
- if x != nil {
- return x.SpecialChars
- }
- return ""
- }
- func (x *PasswordRules) GetRejectCommonWeak() bool {
- if x != nil {
- return x.RejectCommonWeak
- }
- return false
- }
- func (x *PasswordRules) GetErrorMessage() string {
- if x != nil {
- return x.ErrorMessage
- }
- return ""
- }
- // 企业信息验证规则
- type EnterpriseInfoRules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 企业名称规则
- CompanyName *StringRules `protobuf:"bytes,1,opt,name=company_name,json=companyName,proto3" json:"company_name"`
- // 统一社会信用代码规则
- Uscc *UnifiedSocialCreditCodeRules `protobuf:"bytes,2,opt,name=uscc,proto3" json:"uscc"`
- // 法人姓名规则
- LegalPersonName *ChineseNameRules `protobuf:"bytes,3,opt,name=legal_person_name,json=legalPersonName,proto3" json:"legal_person_name"`
- // 注册资本范围
- MinRegisteredCapital *int64 `protobuf:"varint,4,opt,name=min_registered_capital,json=minRegisteredCapital,proto3,oneof" json:"min_registered_capital"`
- MaxRegisteredCapital *int64 `protobuf:"varint,5,opt,name=max_registered_capital,json=maxRegisteredCapital,proto3,oneof" json:"max_registered_capital"`
- // 营业执照号码(旧格式)
- BusinessLicense *StringRules `protobuf:"bytes,6,opt,name=business_license,json=businessLicense,proto3" json:"business_license"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *EnterpriseInfoRules) Reset() {
- *x = EnterpriseInfoRules{}
- mi := &file_kuban_api_validate_business_rules_proto_msgTypes[8]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *EnterpriseInfoRules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*EnterpriseInfoRules) ProtoMessage() {}
- func (x *EnterpriseInfoRules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_business_rules_proto_msgTypes[8]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use EnterpriseInfoRules.ProtoReflect.Descriptor instead.
- func (*EnterpriseInfoRules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{8}
- }
- func (x *EnterpriseInfoRules) GetCompanyName() *StringRules {
- if x != nil {
- return x.CompanyName
- }
- return nil
- }
- func (x *EnterpriseInfoRules) GetUscc() *UnifiedSocialCreditCodeRules {
- if x != nil {
- return x.Uscc
- }
- return nil
- }
- func (x *EnterpriseInfoRules) GetLegalPersonName() *ChineseNameRules {
- if x != nil {
- return x.LegalPersonName
- }
- return nil
- }
- func (x *EnterpriseInfoRules) GetMinRegisteredCapital() int64 {
- if x != nil && x.MinRegisteredCapital != nil {
- return *x.MinRegisteredCapital
- }
- return 0
- }
- func (x *EnterpriseInfoRules) GetMaxRegisteredCapital() int64 {
- if x != nil && x.MaxRegisteredCapital != nil {
- return *x.MaxRegisteredCapital
- }
- return 0
- }
- func (x *EnterpriseInfoRules) GetBusinessLicense() *StringRules {
- if x != nil {
- return x.BusinessLicense
- }
- return nil
- }
- // 地址验证规则
- type AddressRules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 省份
- Province *StringRules `protobuf:"bytes,1,opt,name=province,proto3" json:"province"`
- // 城市
- City *StringRules `protobuf:"bytes,2,opt,name=city,proto3" json:"city"`
- // 区县
- District *StringRules `protobuf:"bytes,3,opt,name=district,proto3" json:"district"`
- // 详细地址
- Detail *StringRules `protobuf:"bytes,4,opt,name=detail,proto3" json:"detail"`
- // 邮政编码
- Postcode *PostcodeRules `protobuf:"bytes,5,opt,name=postcode,proto3" json:"postcode"`
- // 是否要求完整地址
- RequireComplete bool `protobuf:"varint,6,opt,name=require_complete,json=requireComplete,proto3" json:"require_complete"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *AddressRules) Reset() {
- *x = AddressRules{}
- mi := &file_kuban_api_validate_business_rules_proto_msgTypes[9]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *AddressRules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*AddressRules) ProtoMessage() {}
- func (x *AddressRules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_business_rules_proto_msgTypes[9]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use AddressRules.ProtoReflect.Descriptor instead.
- func (*AddressRules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{9}
- }
- func (x *AddressRules) GetProvince() *StringRules {
- if x != nil {
- return x.Province
- }
- return nil
- }
- func (x *AddressRules) GetCity() *StringRules {
- if x != nil {
- return x.City
- }
- return nil
- }
- func (x *AddressRules) GetDistrict() *StringRules {
- if x != nil {
- return x.District
- }
- return nil
- }
- func (x *AddressRules) GetDetail() *StringRules {
- if x != nil {
- return x.Detail
- }
- return nil
- }
- func (x *AddressRules) GetPostcode() *PostcodeRules {
- if x != nil {
- return x.Postcode
- }
- return nil
- }
- func (x *AddressRules) GetRequireComplete() bool {
- if x != nil {
- return x.RequireComplete
- }
- return false
- }
- // 金融交易验证规则
- type FinancialTransactionRules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 交易金额范围
- MinAmount *float64 `protobuf:"fixed64,1,opt,name=min_amount,json=minAmount,proto3,oneof" json:"min_amount"`
- MaxAmount *float64 `protobuf:"fixed64,2,opt,name=max_amount,json=maxAmount,proto3,oneof" json:"max_amount"`
- // 银行卡号验证
- BankCard *BankCardRules `protobuf:"bytes,3,opt,name=bank_card,json=bankCard,proto3" json:"bank_card"`
- // 交易密码规则
- TransactionPassword *PasswordRules `protobuf:"bytes,4,opt,name=transaction_password,json=transactionPassword,proto3" json:"transaction_password"`
- // 是否要求二次确认
- RequireConfirmation bool `protobuf:"varint,5,opt,name=require_confirmation,json=requireConfirmation,proto3" json:"require_confirmation"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *FinancialTransactionRules) Reset() {
- *x = FinancialTransactionRules{}
- mi := &file_kuban_api_validate_business_rules_proto_msgTypes[10]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *FinancialTransactionRules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*FinancialTransactionRules) ProtoMessage() {}
- func (x *FinancialTransactionRules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_business_rules_proto_msgTypes[10]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use FinancialTransactionRules.ProtoReflect.Descriptor instead.
- func (*FinancialTransactionRules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{10}
- }
- func (x *FinancialTransactionRules) GetMinAmount() float64 {
- if x != nil && x.MinAmount != nil {
- return *x.MinAmount
- }
- return 0
- }
- func (x *FinancialTransactionRules) GetMaxAmount() float64 {
- if x != nil && x.MaxAmount != nil {
- return *x.MaxAmount
- }
- return 0
- }
- func (x *FinancialTransactionRules) GetBankCard() *BankCardRules {
- if x != nil {
- return x.BankCard
- }
- return nil
- }
- func (x *FinancialTransactionRules) GetTransactionPassword() *PasswordRules {
- if x != nil {
- return x.TransactionPassword
- }
- return nil
- }
- func (x *FinancialTransactionRules) GetRequireConfirmation() bool {
- if x != nil {
- return x.RequireConfirmation
- }
- return false
- }
- // 验证错误详情
- type ValidationError struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 字段路径
- FieldPath string `protobuf:"bytes,1,opt,name=field_path,json=fieldPath,proto3" json:"field_path"`
- // 规则 ID
- RuleId string `protobuf:"bytes,2,opt,name=rule_id,json=ruleId,proto3" json:"rule_id"`
- // 错误消息(中文)
- Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message"`
- // 错误消息(英文)
- MessageEn string `protobuf:"bytes,4,opt,name=message_en,json=messageEn,proto3" json:"message_en"`
- // 失败的值
- Value string `protobuf:"bytes,5,opt,name=value,proto3" json:"value"`
- // 附加信息
- Metadata map[string]string `protobuf:"bytes,6,rep,name=metadata,proto3" json:"metadata" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *ValidationError) Reset() {
- *x = ValidationError{}
- mi := &file_kuban_api_validate_business_rules_proto_msgTypes[11]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *ValidationError) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*ValidationError) ProtoMessage() {}
- func (x *ValidationError) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_business_rules_proto_msgTypes[11]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use ValidationError.ProtoReflect.Descriptor instead.
- func (*ValidationError) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{11}
- }
- func (x *ValidationError) GetFieldPath() string {
- if x != nil {
- return x.FieldPath
- }
- return ""
- }
- func (x *ValidationError) GetRuleId() string {
- if x != nil {
- return x.RuleId
- }
- return ""
- }
- func (x *ValidationError) GetMessage() string {
- if x != nil {
- return x.Message
- }
- return ""
- }
- func (x *ValidationError) GetMessageEn() string {
- if x != nil {
- return x.MessageEn
- }
- return ""
- }
- func (x *ValidationError) GetValue() string {
- if x != nil {
- return x.Value
- }
- return ""
- }
- func (x *ValidationError) GetMetadata() map[string]string {
- if x != nil {
- return x.Metadata
- }
- return nil
- }
- // 批量验证结果
- type ValidationResult struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 是否验证通过
- Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid"`
- // 错误列表
- Errors []*ValidationError `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors"`
- // 警告列表(非阻塞性)
- Warnings []*ValidationError `protobuf:"bytes,3,rep,name=warnings,proto3" json:"warnings"`
- // 验证组
- Group string `protobuf:"bytes,4,opt,name=group,proto3" json:"group"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *ValidationResult) Reset() {
- *x = ValidationResult{}
- mi := &file_kuban_api_validate_business_rules_proto_msgTypes[12]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *ValidationResult) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*ValidationResult) ProtoMessage() {}
- func (x *ValidationResult) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_business_rules_proto_msgTypes[12]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use ValidationResult.ProtoReflect.Descriptor instead.
- func (*ValidationResult) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{12}
- }
- func (x *ValidationResult) GetValid() bool {
- if x != nil {
- return x.Valid
- }
- return false
- }
- func (x *ValidationResult) GetErrors() []*ValidationError {
- if x != nil {
- return x.Errors
- }
- return nil
- }
- func (x *ValidationResult) GetWarnings() []*ValidationError {
- if x != nil {
- return x.Warnings
- }
- return nil
- }
- func (x *ValidationResult) GetGroup() string {
- if x != nil {
- return x.Group
- }
- return ""
- }
- var File_kuban_api_validate_business_rules_proto protoreflect.FileDescriptor
- const file_kuban_api_validate_business_rules_proto_rawDesc = "" +
- "\n" +
- "'kuban/api/validate/business_rules.proto\x12\x12kuban.api.validate\x1a google/protobuf/descriptor.proto\x1a!kuban/api/validate/validate.proto\"\xc9\x01\n" +
- "\x12ChineseMobileRules\x12\x18\n" +
- "\aenabled\x18\x01 \x01(\bR\aenabled\x12O\n" +
- "\x11allowed_operators\x18\x02 \x03(\x0e2\".kuban.api.validate.MobileOperatorR\x10allowedOperators\x12#\n" +
- "\rallow_virtual\x18\x03 \x01(\bR\fallowVirtual\x12#\n" +
- "\rerror_message\x18\x04 \x01(\tR\ferrorMessage\"\xc9\x03\n" +
- "\x12ChineseIdCardRules\x12\x18\n" +
- "\aenabled\x18\x01 \x01(\bR\aenabled\x12'\n" +
- "\x0fverify_checksum\x18\x02 \x01(\bR\x0everifyChecksum\x12*\n" +
- "\x11verify_birth_date\x18\x03 \x01(\bR\x0fverifyBirthDate\x12(\n" +
- "\x10verify_area_code\x18\x04 \x01(\bR\x0everifyAreaCode\x12C\n" +
- "\rallowed_types\x18\x05 \x03(\x0e2\x1e.kuban.api.validate.IdCardTypeR\fallowedTypes\x12\x1c\n" +
- "\amin_age\x18\x06 \x01(\x05H\x00R\x06minAge\x88\x01\x01\x12\x1c\n" +
- "\amax_age\x18\a \x01(\x05H\x01R\x06maxAge\x88\x01\x01\x12H\n" +
- "\x0frequired_gender\x18\b \x01(\x0e2\x1a.kuban.api.validate.GenderH\x02R\x0erequiredGender\x88\x01\x01\x12#\n" +
- "\rerror_message\x18\t \x01(\tR\ferrorMessageB\n" +
- "\n" +
- "\b_min_ageB\n" +
- "\n" +
- "\b_max_ageB\x12\n" +
- "\x10_required_gender\"\xd1\x01\n" +
- "\x1cUnifiedSocialCreditCodeRules\x12\x18\n" +
- "\aenabled\x18\x01 \x01(\bR\aenabled\x12'\n" +
- "\x0fverify_checksum\x18\x02 \x01(\bR\x0everifyChecksum\x12I\n" +
- "\rallowed_types\x18\x03 \x03(\x0e2$.kuban.api.validate.OrganizationTypeR\fallowedTypes\x12#\n" +
- "\rerror_message\x18\x04 \x01(\tR\ferrorMessage\"\xdb\x01\n" +
- "\rBankCardRules\x12\x18\n" +
- "\aenabled\x18\x01 \x01(\bR\aenabled\x12\x1f\n" +
- "\vverify_luhn\x18\x02 \x01(\bR\n" +
- "verifyLuhn\x12E\n" +
- "\rallowed_types\x18\x03 \x03(\x0e2 .kuban.api.validate.BankCardTypeR\fallowedTypes\x12#\n" +
- "\rallowed_banks\x18\x04 \x03(\tR\fallowedBanks\x12#\n" +
- "\rerror_message\x18\x05 \x01(\tR\ferrorMessage\"\x90\x02\n" +
- "\x10ChineseNameRules\x12\x18\n" +
- "\aenabled\x18\x01 \x01(\bR\aenabled\x12\"\n" +
- "\n" +
- "min_length\x18\x02 \x01(\rH\x00R\tminLength\x88\x01\x01\x12\"\n" +
- "\n" +
- "max_length\x18\x03 \x01(\rH\x01R\tmaxLength\x88\x01\x01\x122\n" +
- "\x15allow_ethnic_minority\x18\x04 \x01(\bR\x13allowEthnicMinority\x12#\n" +
- "\rallow_english\x18\x05 \x01(\bR\fallowEnglish\x12#\n" +
- "\rerror_message\x18\x06 \x01(\tR\ferrorMessageB\r\n" +
- "\v_min_lengthB\r\n" +
- "\v_max_length\"\x9e\x01\n" +
- "\rPostcodeRules\x12\x18\n" +
- "\aenabled\x18\x01 \x01(\bR\aenabled\x12!\n" +
- "\fcountry_code\x18\x02 \x01(\tR\vcountryCode\x12+\n" +
- "\x11allowed_provinces\x18\x03 \x03(\tR\x10allowedProvinces\x12#\n" +
- "\rerror_message\x18\x04 \x01(\tR\ferrorMessage\"\x8e\x03\n" +
- "\x15UserRegistrationRules\x12;\n" +
- "\busername\x18\x01 \x01(\v2\x1f.kuban.api.validate.StringRulesR\busername\x12>\n" +
- "\x06mobile\x18\x02 \x01(\v2&.kuban.api.validate.ChineseMobileRulesR\x06mobile\x125\n" +
- "\x05email\x18\x03 \x01(\v2\x1f.kuban.api.validate.StringRulesR\x05email\x12=\n" +
- "\bpassword\x18\x04 \x01(\v2!.kuban.api.validate.PasswordRulesR\bpassword\x12A\n" +
- "\treal_name\x18\x05 \x01(\v2$.kuban.api.validate.ChineseNameRulesR\brealName\x12?\n" +
- "\aid_card\x18\x06 \x01(\v2&.kuban.api.validate.ChineseIdCardRulesR\x06idCard\"\xed\x02\n" +
- "\rPasswordRules\x12\x1d\n" +
- "\n" +
- "min_length\x18\x01 \x01(\rR\tminLength\x12\x1d\n" +
- "\n" +
- "max_length\x18\x02 \x01(\rR\tmaxLength\x12+\n" +
- "\x11require_uppercase\x18\x03 \x01(\bR\x10requireUppercase\x12+\n" +
- "\x11require_lowercase\x18\x04 \x01(\bR\x10requireLowercase\x12#\n" +
- "\rrequire_digit\x18\x05 \x01(\bR\frequireDigit\x12'\n" +
- "\x0frequire_special\x18\x06 \x01(\bR\x0erequireSpecial\x12#\n" +
- "\rspecial_chars\x18\a \x01(\tR\fspecialChars\x12,\n" +
- "\x12reject_common_weak\x18\b \x01(\bR\x10rejectCommonWeak\x12#\n" +
- "\rerror_message\x18\t \x01(\tR\ferrorMessage\"\xe9\x03\n" +
- "\x13EnterpriseInfoRules\x12B\n" +
- "\fcompany_name\x18\x01 \x01(\v2\x1f.kuban.api.validate.StringRulesR\vcompanyName\x12D\n" +
- "\x04uscc\x18\x02 \x01(\v20.kuban.api.validate.UnifiedSocialCreditCodeRulesR\x04uscc\x12P\n" +
- "\x11legal_person_name\x18\x03 \x01(\v2$.kuban.api.validate.ChineseNameRulesR\x0flegalPersonName\x129\n" +
- "\x16min_registered_capital\x18\x04 \x01(\x03H\x00R\x14minRegisteredCapital\x88\x01\x01\x129\n" +
- "\x16max_registered_capital\x18\x05 \x01(\x03H\x01R\x14maxRegisteredCapital\x88\x01\x01\x12J\n" +
- "\x10business_license\x18\x06 \x01(\v2\x1f.kuban.api.validate.StringRulesR\x0fbusinessLicenseB\x19\n" +
- "\x17_min_registered_capitalB\x19\n" +
- "\x17_max_registered_capital\"\xe0\x02\n" +
- "\fAddressRules\x12;\n" +
- "\bprovince\x18\x01 \x01(\v2\x1f.kuban.api.validate.StringRulesR\bprovince\x123\n" +
- "\x04city\x18\x02 \x01(\v2\x1f.kuban.api.validate.StringRulesR\x04city\x12;\n" +
- "\bdistrict\x18\x03 \x01(\v2\x1f.kuban.api.validate.StringRulesR\bdistrict\x127\n" +
- "\x06detail\x18\x04 \x01(\v2\x1f.kuban.api.validate.StringRulesR\x06detail\x12=\n" +
- "\bpostcode\x18\x05 \x01(\v2!.kuban.api.validate.PostcodeRulesR\bpostcode\x12)\n" +
- "\x10require_complete\x18\x06 \x01(\bR\x0frequireComplete\"\xca\x02\n" +
- "\x19FinancialTransactionRules\x12\"\n" +
- "\n" +
- "min_amount\x18\x01 \x01(\x01H\x00R\tminAmount\x88\x01\x01\x12\"\n" +
- "\n" +
- "max_amount\x18\x02 \x01(\x01H\x01R\tmaxAmount\x88\x01\x01\x12>\n" +
- "\tbank_card\x18\x03 \x01(\v2!.kuban.api.validate.BankCardRulesR\bbankCard\x12T\n" +
- "\x14transaction_password\x18\x04 \x01(\v2!.kuban.api.validate.PasswordRulesR\x13transactionPassword\x121\n" +
- "\x14require_confirmation\x18\x05 \x01(\bR\x13requireConfirmationB\r\n" +
- "\v_min_amountB\r\n" +
- "\v_max_amount\"\xa4\x02\n" +
- "\x0fValidationError\x12\x1d\n" +
- "\n" +
- "field_path\x18\x01 \x01(\tR\tfieldPath\x12\x17\n" +
- "\arule_id\x18\x02 \x01(\tR\x06ruleId\x12\x18\n" +
- "\amessage\x18\x03 \x01(\tR\amessage\x12\x1d\n" +
- "\n" +
- "message_en\x18\x04 \x01(\tR\tmessageEn\x12\x14\n" +
- "\x05value\x18\x05 \x01(\tR\x05value\x12M\n" +
- "\bmetadata\x18\x06 \x03(\v21.kuban.api.validate.ValidationError.MetadataEntryR\bmetadata\x1a;\n" +
- "\rMetadataEntry\x12\x10\n" +
- "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
- "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xbc\x01\n" +
- "\x10ValidationResult\x12\x14\n" +
- "\x05valid\x18\x01 \x01(\bR\x05valid\x12;\n" +
- "\x06errors\x18\x02 \x03(\v2#.kuban.api.validate.ValidationErrorR\x06errors\x12?\n" +
- "\bwarnings\x18\x03 \x03(\v2#.kuban.api.validate.ValidationErrorR\bwarnings\x12\x14\n" +
- "\x05group\x18\x04 \x01(\tR\x05group*\xbc\x01\n" +
- "\x0eMobileOperator\x12\x1f\n" +
- "\x1bMOBILE_OPERATOR_UNSPECIFIED\x10\x00\x12 \n" +
- "\x1cMOBILE_OPERATOR_CHINA_MOBILE\x10\x01\x12 \n" +
- "\x1cMOBILE_OPERATOR_CHINA_UNICOM\x10\x02\x12!\n" +
- "\x1dMOBILE_OPERATOR_CHINA_TELECOM\x10\x03\x12\"\n" +
- "\x1eMOBILE_OPERATOR_CHINA_BROADNET\x10\x04*`\n" +
- "\n" +
- "IdCardType\x12\x1c\n" +
- "\x18ID_CARD_TYPE_UNSPECIFIED\x10\x00\x12\x19\n" +
- "\x15ID_CARD_TYPE_18_DIGIT\x10\x01\x12\x19\n" +
- "\x15ID_CARD_TYPE_15_DIGIT\x10\x02*D\n" +
- "\x06Gender\x12\x16\n" +
- "\x12GENDER_UNSPECIFIED\x10\x00\x12\x0f\n" +
- "\vGENDER_MALE\x10\x01\x12\x11\n" +
- "\rGENDER_FEMALE\x10\x02*\xc0\x01\n" +
- "\x10OrganizationType\x12!\n" +
- "\x1dORGANIZATION_TYPE_UNSPECIFIED\x10\x00\x12 \n" +
- "\x1cORGANIZATION_TYPE_ENTERPRISE\x10\x01\x12!\n" +
- "\x1dORGANIZATION_TYPE_INSTITUTION\x10\x02\x12\"\n" +
- "\x1eORGANIZATION_TYPE_SOCIAL_GROUP\x10\x03\x12 \n" +
- "\x1cORGANIZATION_TYPE_GOVERNMENT\x10\t*c\n" +
- "\fBankCardType\x12\x1e\n" +
- "\x1aBANK_CARD_TYPE_UNSPECIFIED\x10\x00\x12\x18\n" +
- "\x14BANK_CARD_TYPE_DEBIT\x10\x01\x12\x19\n" +
- "\x15BANK_CARD_TYPE_CREDIT\x10\x02B=Z;git.ikuban.com/server/kubanapis/kuban/api/validate;validateb\x06proto3"
- var (
- file_kuban_api_validate_business_rules_proto_rawDescOnce sync.Once
- file_kuban_api_validate_business_rules_proto_rawDescData []byte
- )
- func file_kuban_api_validate_business_rules_proto_rawDescGZIP() []byte {
- file_kuban_api_validate_business_rules_proto_rawDescOnce.Do(func() {
- file_kuban_api_validate_business_rules_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_kuban_api_validate_business_rules_proto_rawDesc), len(file_kuban_api_validate_business_rules_proto_rawDesc)))
- })
- return file_kuban_api_validate_business_rules_proto_rawDescData
- }
- var file_kuban_api_validate_business_rules_proto_enumTypes = make([]protoimpl.EnumInfo, 5)
- var file_kuban_api_validate_business_rules_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
- var file_kuban_api_validate_business_rules_proto_goTypes = []any{
- (MobileOperator)(0), // 0: kuban.api.validate.MobileOperator
- (IdCardType)(0), // 1: kuban.api.validate.IdCardType
- (Gender)(0), // 2: kuban.api.validate.Gender
- (OrganizationType)(0), // 3: kuban.api.validate.OrganizationType
- (BankCardType)(0), // 4: kuban.api.validate.BankCardType
- (*ChineseMobileRules)(nil), // 5: kuban.api.validate.ChineseMobileRules
- (*ChineseIdCardRules)(nil), // 6: kuban.api.validate.ChineseIdCardRules
- (*UnifiedSocialCreditCodeRules)(nil), // 7: kuban.api.validate.UnifiedSocialCreditCodeRules
- (*BankCardRules)(nil), // 8: kuban.api.validate.BankCardRules
- (*ChineseNameRules)(nil), // 9: kuban.api.validate.ChineseNameRules
- (*PostcodeRules)(nil), // 10: kuban.api.validate.PostcodeRules
- (*UserRegistrationRules)(nil), // 11: kuban.api.validate.UserRegistrationRules
- (*PasswordRules)(nil), // 12: kuban.api.validate.PasswordRules
- (*EnterpriseInfoRules)(nil), // 13: kuban.api.validate.EnterpriseInfoRules
- (*AddressRules)(nil), // 14: kuban.api.validate.AddressRules
- (*FinancialTransactionRules)(nil), // 15: kuban.api.validate.FinancialTransactionRules
- (*ValidationError)(nil), // 16: kuban.api.validate.ValidationError
- (*ValidationResult)(nil), // 17: kuban.api.validate.ValidationResult
- nil, // 18: kuban.api.validate.ValidationError.MetadataEntry
- (*StringRules)(nil), // 19: kuban.api.validate.StringRules
- }
- var file_kuban_api_validate_business_rules_proto_depIdxs = []int32{
- 0, // 0: kuban.api.validate.ChineseMobileRules.allowed_operators:type_name -> kuban.api.validate.MobileOperator
- 1, // 1: kuban.api.validate.ChineseIdCardRules.allowed_types:type_name -> kuban.api.validate.IdCardType
- 2, // 2: kuban.api.validate.ChineseIdCardRules.required_gender:type_name -> kuban.api.validate.Gender
- 3, // 3: kuban.api.validate.UnifiedSocialCreditCodeRules.allowed_types:type_name -> kuban.api.validate.OrganizationType
- 4, // 4: kuban.api.validate.BankCardRules.allowed_types:type_name -> kuban.api.validate.BankCardType
- 19, // 5: kuban.api.validate.UserRegistrationRules.username:type_name -> kuban.api.validate.StringRules
- 5, // 6: kuban.api.validate.UserRegistrationRules.mobile:type_name -> kuban.api.validate.ChineseMobileRules
- 19, // 7: kuban.api.validate.UserRegistrationRules.email:type_name -> kuban.api.validate.StringRules
- 12, // 8: kuban.api.validate.UserRegistrationRules.password:type_name -> kuban.api.validate.PasswordRules
- 9, // 9: kuban.api.validate.UserRegistrationRules.real_name:type_name -> kuban.api.validate.ChineseNameRules
- 6, // 10: kuban.api.validate.UserRegistrationRules.id_card:type_name -> kuban.api.validate.ChineseIdCardRules
- 19, // 11: kuban.api.validate.EnterpriseInfoRules.company_name:type_name -> kuban.api.validate.StringRules
- 7, // 12: kuban.api.validate.EnterpriseInfoRules.uscc:type_name -> kuban.api.validate.UnifiedSocialCreditCodeRules
- 9, // 13: kuban.api.validate.EnterpriseInfoRules.legal_person_name:type_name -> kuban.api.validate.ChineseNameRules
- 19, // 14: kuban.api.validate.EnterpriseInfoRules.business_license:type_name -> kuban.api.validate.StringRules
- 19, // 15: kuban.api.validate.AddressRules.province:type_name -> kuban.api.validate.StringRules
- 19, // 16: kuban.api.validate.AddressRules.city:type_name -> kuban.api.validate.StringRules
- 19, // 17: kuban.api.validate.AddressRules.district:type_name -> kuban.api.validate.StringRules
- 19, // 18: kuban.api.validate.AddressRules.detail:type_name -> kuban.api.validate.StringRules
- 10, // 19: kuban.api.validate.AddressRules.postcode:type_name -> kuban.api.validate.PostcodeRules
- 8, // 20: kuban.api.validate.FinancialTransactionRules.bank_card:type_name -> kuban.api.validate.BankCardRules
- 12, // 21: kuban.api.validate.FinancialTransactionRules.transaction_password:type_name -> kuban.api.validate.PasswordRules
- 18, // 22: kuban.api.validate.ValidationError.metadata:type_name -> kuban.api.validate.ValidationError.MetadataEntry
- 16, // 23: kuban.api.validate.ValidationResult.errors:type_name -> kuban.api.validate.ValidationError
- 16, // 24: kuban.api.validate.ValidationResult.warnings:type_name -> kuban.api.validate.ValidationError
- 25, // [25:25] is the sub-list for method output_type
- 25, // [25:25] is the sub-list for method input_type
- 25, // [25:25] is the sub-list for extension type_name
- 25, // [25:25] is the sub-list for extension extendee
- 0, // [0:25] is the sub-list for field type_name
- }
- func init() { file_kuban_api_validate_business_rules_proto_init() }
- func file_kuban_api_validate_business_rules_proto_init() {
- if File_kuban_api_validate_business_rules_proto != nil {
- return
- }
- file_kuban_api_validate_validate_proto_init()
- file_kuban_api_validate_business_rules_proto_msgTypes[1].OneofWrappers = []any{}
- file_kuban_api_validate_business_rules_proto_msgTypes[4].OneofWrappers = []any{}
- file_kuban_api_validate_business_rules_proto_msgTypes[8].OneofWrappers = []any{}
- file_kuban_api_validate_business_rules_proto_msgTypes[10].OneofWrappers = []any{}
- type x struct{}
- out := protoimpl.TypeBuilder{
- File: protoimpl.DescBuilder{
- GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: unsafe.Slice(unsafe.StringData(file_kuban_api_validate_business_rules_proto_rawDesc), len(file_kuban_api_validate_business_rules_proto_rawDesc)),
- NumEnums: 5,
- NumMessages: 14,
- NumExtensions: 0,
- NumServices: 0,
- },
- GoTypes: file_kuban_api_validate_business_rules_proto_goTypes,
- DependencyIndexes: file_kuban_api_validate_business_rules_proto_depIdxs,
- EnumInfos: file_kuban_api_validate_business_rules_proto_enumTypes,
- MessageInfos: file_kuban_api_validate_business_rules_proto_msgTypes,
- }.Build()
- File_kuban_api_validate_business_rules_proto = out.File
- file_kuban_api_validate_business_rules_proto_goTypes = nil
- file_kuban_api_validate_business_rules_proto_depIdxs = nil
- }
|