| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617 |
- // Copyright 2025 Kuban Technologies
- //
- // 自定义字段验证框架 - 基于 buf/validate 优化设计
- // 提供简化的 API、中文支持和业务规则集成
- // 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/validate.proto
- package validate
- import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
- descriptorpb "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 IgnoreRule int32
- const (
- // 未指定 - 默认行为(字段未设置时不验证)
- IgnoreRule_IGNORE_UNSPECIFIED IgnoreRule = 0
- // 字段为零值时忽略验证
- IgnoreRule_IGNORE_IF_ZERO IgnoreRule = 1
- // 始终忽略验证
- IgnoreRule_IGNORE_ALWAYS IgnoreRule = 2
- // 从不忽略验证(即使未设置也验证)
- IgnoreRule_IGNORE_NEVER IgnoreRule = 3
- )
- // Enum value maps for IgnoreRule.
- var (
- IgnoreRule_name = map[int32]string{
- 0: "IGNORE_UNSPECIFIED",
- 1: "IGNORE_IF_ZERO",
- 2: "IGNORE_ALWAYS",
- 3: "IGNORE_NEVER",
- }
- IgnoreRule_value = map[string]int32{
- "IGNORE_UNSPECIFIED": 0,
- "IGNORE_IF_ZERO": 1,
- "IGNORE_ALWAYS": 2,
- "IGNORE_NEVER": 3,
- }
- )
- func (x IgnoreRule) Enum() *IgnoreRule {
- p := new(IgnoreRule)
- *p = x
- return p
- }
- func (x IgnoreRule) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
- }
- func (IgnoreRule) Descriptor() protoreflect.EnumDescriptor {
- return file_kuban_api_validate_validate_proto_enumTypes[0].Descriptor()
- }
- func (IgnoreRule) Type() protoreflect.EnumType {
- return &file_kuban_api_validate_validate_proto_enumTypes[0]
- }
- func (x IgnoreRule) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
- }
- // Deprecated: Use IgnoreRule.Descriptor instead.
- func (IgnoreRule) EnumDescriptor() ([]byte, []int) {
- return file_kuban_api_validate_validate_proto_rawDescGZIP(), []int{0}
- }
- // CEL 验证规则
- // 使用 Common Expression Language 编写自定义验证逻辑
- type Rule struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 规则唯一标识符
- Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"`
- // 错误消息(中文)
- Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message"`
- // 错误消息(英文) - 可选,用于国际化
- MessageEn string `protobuf:"bytes,3,opt,name=message_en,json=messageEn,proto3" json:"message_en"`
- // CEL 表达式 - 返回 true 表示验证通过
- Expression string `protobuf:"bytes,4,opt,name=expression,proto3" json:"expression"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *Rule) Reset() {
- *x = Rule{}
- mi := &file_kuban_api_validate_validate_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *Rule) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*Rule) ProtoMessage() {}
- func (x *Rule) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_validate_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 Rule.ProtoReflect.Descriptor instead.
- func (*Rule) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_validate_proto_rawDescGZIP(), []int{0}
- }
- func (x *Rule) GetId() string {
- if x != nil {
- return x.Id
- }
- return ""
- }
- func (x *Rule) GetMessage() string {
- if x != nil {
- return x.Message
- }
- return ""
- }
- func (x *Rule) GetMessageEn() string {
- if x != nil {
- return x.MessageEn
- }
- return ""
- }
- func (x *Rule) GetExpression() string {
- if x != nil {
- return x.Expression
- }
- return ""
- }
- // 消息级别验证规则
- type MessageRules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // CEL 自定义规则列表
- Cel []*Rule `protobuf:"bytes,1,rep,name=cel,proto3" json:"cel"`
- // 是否禁用所有字段验证
- Disabled bool `protobuf:"varint,2,opt,name=disabled,proto3" json:"disabled"`
- // 验证组 - 用于分组验证
- Groups []string `protobuf:"bytes,3,rep,name=groups,proto3" json:"groups"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *MessageRules) Reset() {
- *x = MessageRules{}
- mi := &file_kuban_api_validate_validate_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *MessageRules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*MessageRules) ProtoMessage() {}
- func (x *MessageRules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_validate_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 MessageRules.ProtoReflect.Descriptor instead.
- func (*MessageRules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_validate_proto_rawDescGZIP(), []int{1}
- }
- func (x *MessageRules) GetCel() []*Rule {
- if x != nil {
- return x.Cel
- }
- return nil
- }
- func (x *MessageRules) GetDisabled() bool {
- if x != nil {
- return x.Disabled
- }
- return false
- }
- func (x *MessageRules) GetGroups() []string {
- if x != nil {
- return x.Groups
- }
- return nil
- }
- // Oneof 验证规则
- type OneofRules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 是否必须选择一个字段
- Required bool `protobuf:"varint,1,opt,name=required,proto3" json:"required"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *OneofRules) Reset() {
- *x = OneofRules{}
- mi := &file_kuban_api_validate_validate_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *OneofRules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*OneofRules) ProtoMessage() {}
- func (x *OneofRules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_validate_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 OneofRules.ProtoReflect.Descriptor instead.
- func (*OneofRules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_validate_proto_rawDescGZIP(), []int{2}
- }
- func (x *OneofRules) GetRequired() bool {
- if x != nil {
- return x.Required
- }
- return false
- }
- // 字段级别验证规则
- type FieldRules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // CEL 自定义规则列表
- Cel []*Rule `protobuf:"bytes,1,rep,name=cel,proto3" json:"cel"`
- // 字段是否必填 (Proto3 不需要 optional 关键字)
- Required bool `protobuf:"varint,2,opt,name=required,proto3" json:"required"`
- // 忽略策略
- Ignore IgnoreRule `protobuf:"varint,3,opt,name=ignore,proto3,enum=kuban.api.validate.IgnoreRule" json:"ignore"`
- // 验证组 - 只在指定组中验证
- Groups []string `protobuf:"bytes,4,rep,name=groups,proto3" json:"groups"`
- // 通用错误消息(中文) - 覆盖所有验证规则的默认消息
- ErrorMessage string `protobuf:"bytes,5,opt,name=error_message,json=errorMessage,proto3" json:"error_message"`
- // 通用错误消息(英文)
- ErrorMessageEn string `protobuf:"bytes,6,opt,name=error_message_en,json=errorMessageEn,proto3" json:"error_message_en"`
- // required 验证专用错误消息(中文)
- RequiredMessage string `protobuf:"bytes,7,opt,name=required_message,json=requiredMessage,proto3" json:"required_message"`
- // required 验证专用错误消息(英文)
- RequiredMessageEn string `protobuf:"bytes,8,opt,name=required_message_en,json=requiredMessageEn,proto3" json:"required_message_en"`
- // 类型特定的验证规则
- //
- // Types that are valid to be assigned to Type:
- //
- // *FieldRules_Float
- // *FieldRules_Double
- // *FieldRules_Int32
- // *FieldRules_Int64
- // *FieldRules_Uint32
- // *FieldRules_Uint64
- // *FieldRules_Sint32
- // *FieldRules_Sint64
- // *FieldRules_Fixed32
- // *FieldRules_Fixed64
- // *FieldRules_Sfixed32
- // *FieldRules_Sfixed64
- // *FieldRules_Bool
- // *FieldRules_String_
- // *FieldRules_Bytes
- // *FieldRules_Enum
- // *FieldRules_Repeated
- // *FieldRules_Map
- // *FieldRules_Duration
- // *FieldRules_Timestamp
- Type isFieldRules_Type `protobuf_oneof:"type"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *FieldRules) Reset() {
- *x = FieldRules{}
- mi := &file_kuban_api_validate_validate_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *FieldRules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*FieldRules) ProtoMessage() {}
- func (x *FieldRules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_validate_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 FieldRules.ProtoReflect.Descriptor instead.
- func (*FieldRules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_validate_proto_rawDescGZIP(), []int{3}
- }
- func (x *FieldRules) GetCel() []*Rule {
- if x != nil {
- return x.Cel
- }
- return nil
- }
- func (x *FieldRules) GetRequired() bool {
- if x != nil {
- return x.Required
- }
- return false
- }
- func (x *FieldRules) GetIgnore() IgnoreRule {
- if x != nil {
- return x.Ignore
- }
- return IgnoreRule_IGNORE_UNSPECIFIED
- }
- func (x *FieldRules) GetGroups() []string {
- if x != nil {
- return x.Groups
- }
- return nil
- }
- func (x *FieldRules) GetErrorMessage() string {
- if x != nil {
- return x.ErrorMessage
- }
- return ""
- }
- func (x *FieldRules) GetErrorMessageEn() string {
- if x != nil {
- return x.ErrorMessageEn
- }
- return ""
- }
- func (x *FieldRules) GetRequiredMessage() string {
- if x != nil {
- return x.RequiredMessage
- }
- return ""
- }
- func (x *FieldRules) GetRequiredMessageEn() string {
- if x != nil {
- return x.RequiredMessageEn
- }
- return ""
- }
- func (x *FieldRules) GetType() isFieldRules_Type {
- if x != nil {
- return x.Type
- }
- return nil
- }
- func (x *FieldRules) GetFloat() *FloatRules {
- if x != nil {
- if x, ok := x.Type.(*FieldRules_Float); ok {
- return x.Float
- }
- }
- return nil
- }
- func (x *FieldRules) GetDouble() *DoubleRules {
- if x != nil {
- if x, ok := x.Type.(*FieldRules_Double); ok {
- return x.Double
- }
- }
- return nil
- }
- func (x *FieldRules) GetInt32() *Int32Rules {
- if x != nil {
- if x, ok := x.Type.(*FieldRules_Int32); ok {
- return x.Int32
- }
- }
- return nil
- }
- func (x *FieldRules) GetInt64() *Int64Rules {
- if x != nil {
- if x, ok := x.Type.(*FieldRules_Int64); ok {
- return x.Int64
- }
- }
- return nil
- }
- func (x *FieldRules) GetUint32() *UInt32Rules {
- if x != nil {
- if x, ok := x.Type.(*FieldRules_Uint32); ok {
- return x.Uint32
- }
- }
- return nil
- }
- func (x *FieldRules) GetUint64() *UInt64Rules {
- if x != nil {
- if x, ok := x.Type.(*FieldRules_Uint64); ok {
- return x.Uint64
- }
- }
- return nil
- }
- func (x *FieldRules) GetSint32() *SInt32Rules {
- if x != nil {
- if x, ok := x.Type.(*FieldRules_Sint32); ok {
- return x.Sint32
- }
- }
- return nil
- }
- func (x *FieldRules) GetSint64() *SInt64Rules {
- if x != nil {
- if x, ok := x.Type.(*FieldRules_Sint64); ok {
- return x.Sint64
- }
- }
- return nil
- }
- func (x *FieldRules) GetFixed32() *Fixed32Rules {
- if x != nil {
- if x, ok := x.Type.(*FieldRules_Fixed32); ok {
- return x.Fixed32
- }
- }
- return nil
- }
- func (x *FieldRules) GetFixed64() *Fixed64Rules {
- if x != nil {
- if x, ok := x.Type.(*FieldRules_Fixed64); ok {
- return x.Fixed64
- }
- }
- return nil
- }
- func (x *FieldRules) GetSfixed32() *SFixed32Rules {
- if x != nil {
- if x, ok := x.Type.(*FieldRules_Sfixed32); ok {
- return x.Sfixed32
- }
- }
- return nil
- }
- func (x *FieldRules) GetSfixed64() *SFixed64Rules {
- if x != nil {
- if x, ok := x.Type.(*FieldRules_Sfixed64); ok {
- return x.Sfixed64
- }
- }
- return nil
- }
- func (x *FieldRules) GetBool() *BoolRules {
- if x != nil {
- if x, ok := x.Type.(*FieldRules_Bool); ok {
- return x.Bool
- }
- }
- return nil
- }
- func (x *FieldRules) GetString_() *StringRules {
- if x != nil {
- if x, ok := x.Type.(*FieldRules_String_); ok {
- return x.String_
- }
- }
- return nil
- }
- func (x *FieldRules) GetBytes() *BytesRules {
- if x != nil {
- if x, ok := x.Type.(*FieldRules_Bytes); ok {
- return x.Bytes
- }
- }
- return nil
- }
- func (x *FieldRules) GetEnum() *EnumRules {
- if x != nil {
- if x, ok := x.Type.(*FieldRules_Enum); ok {
- return x.Enum
- }
- }
- return nil
- }
- func (x *FieldRules) GetRepeated() *RepeatedRules {
- if x != nil {
- if x, ok := x.Type.(*FieldRules_Repeated); ok {
- return x.Repeated
- }
- }
- return nil
- }
- func (x *FieldRules) GetMap() *MapRules {
- if x != nil {
- if x, ok := x.Type.(*FieldRules_Map); ok {
- return x.Map
- }
- }
- return nil
- }
- func (x *FieldRules) GetDuration() *DurationRules {
- if x != nil {
- if x, ok := x.Type.(*FieldRules_Duration); ok {
- return x.Duration
- }
- }
- return nil
- }
- func (x *FieldRules) GetTimestamp() *TimestampRules {
- if x != nil {
- if x, ok := x.Type.(*FieldRules_Timestamp); ok {
- return x.Timestamp
- }
- }
- return nil
- }
- type isFieldRules_Type interface {
- isFieldRules_Type()
- }
- type FieldRules_Float struct {
- // 数值类型
- Float *FloatRules `protobuf:"bytes,10,opt,name=float,proto3,oneof"`
- }
- type FieldRules_Double struct {
- Double *DoubleRules `protobuf:"bytes,11,opt,name=double,proto3,oneof"`
- }
- type FieldRules_Int32 struct {
- Int32 *Int32Rules `protobuf:"bytes,12,opt,name=int32,proto3,oneof"`
- }
- type FieldRules_Int64 struct {
- Int64 *Int64Rules `protobuf:"bytes,13,opt,name=int64,proto3,oneof"`
- }
- type FieldRules_Uint32 struct {
- Uint32 *UInt32Rules `protobuf:"bytes,14,opt,name=uint32,proto3,oneof"`
- }
- type FieldRules_Uint64 struct {
- Uint64 *UInt64Rules `protobuf:"bytes,15,opt,name=uint64,proto3,oneof"`
- }
- type FieldRules_Sint32 struct {
- Sint32 *SInt32Rules `protobuf:"bytes,16,opt,name=sint32,proto3,oneof"`
- }
- type FieldRules_Sint64 struct {
- Sint64 *SInt64Rules `protobuf:"bytes,17,opt,name=sint64,proto3,oneof"`
- }
- type FieldRules_Fixed32 struct {
- Fixed32 *Fixed32Rules `protobuf:"bytes,18,opt,name=fixed32,proto3,oneof"`
- }
- type FieldRules_Fixed64 struct {
- Fixed64 *Fixed64Rules `protobuf:"bytes,19,opt,name=fixed64,proto3,oneof"`
- }
- type FieldRules_Sfixed32 struct {
- Sfixed32 *SFixed32Rules `protobuf:"bytes,20,opt,name=sfixed32,proto3,oneof"`
- }
- type FieldRules_Sfixed64 struct {
- Sfixed64 *SFixed64Rules `protobuf:"bytes,21,opt,name=sfixed64,proto3,oneof"`
- }
- type FieldRules_Bool struct {
- // 布尔和字符串
- Bool *BoolRules `protobuf:"bytes,30,opt,name=bool,proto3,oneof"`
- }
- type FieldRules_String_ struct {
- String_ *StringRules `protobuf:"bytes,31,opt,name=string,proto3,oneof"`
- }
- type FieldRules_Bytes struct {
- Bytes *BytesRules `protobuf:"bytes,32,opt,name=bytes,proto3,oneof"`
- }
- type FieldRules_Enum struct {
- // 复杂类型
- Enum *EnumRules `protobuf:"bytes,40,opt,name=enum,proto3,oneof"`
- }
- type FieldRules_Repeated struct {
- Repeated *RepeatedRules `protobuf:"bytes,41,opt,name=repeated,proto3,oneof"`
- }
- type FieldRules_Map struct {
- Map *MapRules `protobuf:"bytes,42,opt,name=map,proto3,oneof"`
- }
- type FieldRules_Duration struct {
- // Well-Known Types
- Duration *DurationRules `protobuf:"bytes,50,opt,name=duration,proto3,oneof"`
- }
- type FieldRules_Timestamp struct {
- Timestamp *TimestampRules `protobuf:"bytes,51,opt,name=timestamp,proto3,oneof"`
- }
- func (*FieldRules_Float) isFieldRules_Type() {}
- func (*FieldRules_Double) isFieldRules_Type() {}
- func (*FieldRules_Int32) isFieldRules_Type() {}
- func (*FieldRules_Int64) isFieldRules_Type() {}
- func (*FieldRules_Uint32) isFieldRules_Type() {}
- func (*FieldRules_Uint64) isFieldRules_Type() {}
- func (*FieldRules_Sint32) isFieldRules_Type() {}
- func (*FieldRules_Sint64) isFieldRules_Type() {}
- func (*FieldRules_Fixed32) isFieldRules_Type() {}
- func (*FieldRules_Fixed64) isFieldRules_Type() {}
- func (*FieldRules_Sfixed32) isFieldRules_Type() {}
- func (*FieldRules_Sfixed64) isFieldRules_Type() {}
- func (*FieldRules_Bool) isFieldRules_Type() {}
- func (*FieldRules_String_) isFieldRules_Type() {}
- func (*FieldRules_Bytes) isFieldRules_Type() {}
- func (*FieldRules_Enum) isFieldRules_Type() {}
- func (*FieldRules_Repeated) isFieldRules_Type() {}
- func (*FieldRules_Map) isFieldRules_Type() {}
- func (*FieldRules_Duration) isFieldRules_Type() {}
- func (*FieldRules_Timestamp) isFieldRules_Type() {}
- // 预定义规则(用于规则扩展)
- type PredefinedRules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Cel []*Rule `protobuf:"bytes,1,rep,name=cel,proto3" json:"cel"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *PredefinedRules) Reset() {
- *x = PredefinedRules{}
- mi := &file_kuban_api_validate_validate_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *PredefinedRules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*PredefinedRules) ProtoMessage() {}
- func (x *PredefinedRules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_validate_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 PredefinedRules.ProtoReflect.Descriptor instead.
- func (*PredefinedRules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_validate_proto_rawDescGZIP(), []int{4}
- }
- func (x *PredefinedRules) GetCel() []*Rule {
- if x != nil {
- return x.Cel
- }
- return nil
- }
- // 浮点数验证规则
- type FloatRules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 常量值 - 字段必须等于此值
- Const *float32 `protobuf:"fixed32,1,opt,name=const,proto3,oneof" json:"const"`
- // 小于
- Lt *float32 `protobuf:"fixed32,2,opt,name=lt,proto3,oneof" json:"lt"`
- // 小于等于
- Lte *float32 `protobuf:"fixed32,3,opt,name=lte,proto3,oneof" json:"lte"`
- // 大于
- Gt *float32 `protobuf:"fixed32,4,opt,name=gt,proto3,oneof" json:"gt"`
- // 大于等于
- Gte *float32 `protobuf:"fixed32,5,opt,name=gte,proto3,oneof" json:"gte"`
- // 在值列表中
- In []float32 `protobuf:"fixed32,6,rep,packed,name=in,proto3" json:"in"`
- // 不在值列表中
- NotIn []float32 `protobuf:"fixed32,7,rep,packed,name=not_in,json=notIn,proto3" json:"not_in"`
- // 是否为有限数(非 NaN/Inf)
- Finite *bool `protobuf:"varint,8,opt,name=finite,proto3,oneof" json:"finite"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *FloatRules) Reset() {
- *x = FloatRules{}
- mi := &file_kuban_api_validate_validate_proto_msgTypes[5]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *FloatRules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*FloatRules) ProtoMessage() {}
- func (x *FloatRules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_validate_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 FloatRules.ProtoReflect.Descriptor instead.
- func (*FloatRules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_validate_proto_rawDescGZIP(), []int{5}
- }
- func (x *FloatRules) GetConst() float32 {
- if x != nil && x.Const != nil {
- return *x.Const
- }
- return 0
- }
- func (x *FloatRules) GetLt() float32 {
- if x != nil && x.Lt != nil {
- return *x.Lt
- }
- return 0
- }
- func (x *FloatRules) GetLte() float32 {
- if x != nil && x.Lte != nil {
- return *x.Lte
- }
- return 0
- }
- func (x *FloatRules) GetGt() float32 {
- if x != nil && x.Gt != nil {
- return *x.Gt
- }
- return 0
- }
- func (x *FloatRules) GetGte() float32 {
- if x != nil && x.Gte != nil {
- return *x.Gte
- }
- return 0
- }
- func (x *FloatRules) GetIn() []float32 {
- if x != nil {
- return x.In
- }
- return nil
- }
- func (x *FloatRules) GetNotIn() []float32 {
- if x != nil {
- return x.NotIn
- }
- return nil
- }
- func (x *FloatRules) GetFinite() bool {
- if x != nil && x.Finite != nil {
- return *x.Finite
- }
- return false
- }
- // 双精度浮点数验证规则
- type DoubleRules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Const *float64 `protobuf:"fixed64,1,opt,name=const,proto3,oneof" json:"const"`
- Lt *float64 `protobuf:"fixed64,2,opt,name=lt,proto3,oneof" json:"lt"`
- Lte *float64 `protobuf:"fixed64,3,opt,name=lte,proto3,oneof" json:"lte"`
- Gt *float64 `protobuf:"fixed64,4,opt,name=gt,proto3,oneof" json:"gt"`
- Gte *float64 `protobuf:"fixed64,5,opt,name=gte,proto3,oneof" json:"gte"`
- In []float64 `protobuf:"fixed64,6,rep,packed,name=in,proto3" json:"in"`
- NotIn []float64 `protobuf:"fixed64,7,rep,packed,name=not_in,json=notIn,proto3" json:"not_in"`
- Finite *bool `protobuf:"varint,8,opt,name=finite,proto3,oneof" json:"finite"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *DoubleRules) Reset() {
- *x = DoubleRules{}
- mi := &file_kuban_api_validate_validate_proto_msgTypes[6]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *DoubleRules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*DoubleRules) ProtoMessage() {}
- func (x *DoubleRules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_validate_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 DoubleRules.ProtoReflect.Descriptor instead.
- func (*DoubleRules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_validate_proto_rawDescGZIP(), []int{6}
- }
- func (x *DoubleRules) GetConst() float64 {
- if x != nil && x.Const != nil {
- return *x.Const
- }
- return 0
- }
- func (x *DoubleRules) GetLt() float64 {
- if x != nil && x.Lt != nil {
- return *x.Lt
- }
- return 0
- }
- func (x *DoubleRules) GetLte() float64 {
- if x != nil && x.Lte != nil {
- return *x.Lte
- }
- return 0
- }
- func (x *DoubleRules) GetGt() float64 {
- if x != nil && x.Gt != nil {
- return *x.Gt
- }
- return 0
- }
- func (x *DoubleRules) GetGte() float64 {
- if x != nil && x.Gte != nil {
- return *x.Gte
- }
- return 0
- }
- func (x *DoubleRules) GetIn() []float64 {
- if x != nil {
- return x.In
- }
- return nil
- }
- func (x *DoubleRules) GetNotIn() []float64 {
- if x != nil {
- return x.NotIn
- }
- return nil
- }
- func (x *DoubleRules) GetFinite() bool {
- if x != nil && x.Finite != nil {
- return *x.Finite
- }
- return false
- }
- // Int32 验证规则
- type Int32Rules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Const *int32 `protobuf:"varint,1,opt,name=const,proto3,oneof" json:"const"`
- Lt *int32 `protobuf:"varint,2,opt,name=lt,proto3,oneof" json:"lt"`
- Lte *int32 `protobuf:"varint,3,opt,name=lte,proto3,oneof" json:"lte"`
- Gt *int32 `protobuf:"varint,4,opt,name=gt,proto3,oneof" json:"gt"`
- Gte *int32 `protobuf:"varint,5,opt,name=gte,proto3,oneof" json:"gte"`
- In []int32 `protobuf:"varint,6,rep,packed,name=in,proto3" json:"in"`
- NotIn []int32 `protobuf:"varint,7,rep,packed,name=not_in,json=notIn,proto3" json:"not_in"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *Int32Rules) Reset() {
- *x = Int32Rules{}
- mi := &file_kuban_api_validate_validate_proto_msgTypes[7]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *Int32Rules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*Int32Rules) ProtoMessage() {}
- func (x *Int32Rules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_validate_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 Int32Rules.ProtoReflect.Descriptor instead.
- func (*Int32Rules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_validate_proto_rawDescGZIP(), []int{7}
- }
- func (x *Int32Rules) GetConst() int32 {
- if x != nil && x.Const != nil {
- return *x.Const
- }
- return 0
- }
- func (x *Int32Rules) GetLt() int32 {
- if x != nil && x.Lt != nil {
- return *x.Lt
- }
- return 0
- }
- func (x *Int32Rules) GetLte() int32 {
- if x != nil && x.Lte != nil {
- return *x.Lte
- }
- return 0
- }
- func (x *Int32Rules) GetGt() int32 {
- if x != nil && x.Gt != nil {
- return *x.Gt
- }
- return 0
- }
- func (x *Int32Rules) GetGte() int32 {
- if x != nil && x.Gte != nil {
- return *x.Gte
- }
- return 0
- }
- func (x *Int32Rules) GetIn() []int32 {
- if x != nil {
- return x.In
- }
- return nil
- }
- func (x *Int32Rules) GetNotIn() []int32 {
- if x != nil {
- return x.NotIn
- }
- return nil
- }
- // Int64 验证规则
- type Int64Rules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Const *int64 `protobuf:"varint,1,opt,name=const,proto3,oneof" json:"const"`
- Lt *int64 `protobuf:"varint,2,opt,name=lt,proto3,oneof" json:"lt"`
- Lte *int64 `protobuf:"varint,3,opt,name=lte,proto3,oneof" json:"lte"`
- Gt *int64 `protobuf:"varint,4,opt,name=gt,proto3,oneof" json:"gt"`
- Gte *int64 `protobuf:"varint,5,opt,name=gte,proto3,oneof" json:"gte"`
- In []int64 `protobuf:"varint,6,rep,packed,name=in,proto3" json:"in"`
- NotIn []int64 `protobuf:"varint,7,rep,packed,name=not_in,json=notIn,proto3" json:"not_in"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *Int64Rules) Reset() {
- *x = Int64Rules{}
- mi := &file_kuban_api_validate_validate_proto_msgTypes[8]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *Int64Rules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*Int64Rules) ProtoMessage() {}
- func (x *Int64Rules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_validate_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 Int64Rules.ProtoReflect.Descriptor instead.
- func (*Int64Rules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_validate_proto_rawDescGZIP(), []int{8}
- }
- func (x *Int64Rules) GetConst() int64 {
- if x != nil && x.Const != nil {
- return *x.Const
- }
- return 0
- }
- func (x *Int64Rules) GetLt() int64 {
- if x != nil && x.Lt != nil {
- return *x.Lt
- }
- return 0
- }
- func (x *Int64Rules) GetLte() int64 {
- if x != nil && x.Lte != nil {
- return *x.Lte
- }
- return 0
- }
- func (x *Int64Rules) GetGt() int64 {
- if x != nil && x.Gt != nil {
- return *x.Gt
- }
- return 0
- }
- func (x *Int64Rules) GetGte() int64 {
- if x != nil && x.Gte != nil {
- return *x.Gte
- }
- return 0
- }
- func (x *Int64Rules) GetIn() []int64 {
- if x != nil {
- return x.In
- }
- return nil
- }
- func (x *Int64Rules) GetNotIn() []int64 {
- if x != nil {
- return x.NotIn
- }
- return nil
- }
- // UInt32 验证规则
- type UInt32Rules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Const *uint32 `protobuf:"varint,1,opt,name=const,proto3,oneof" json:"const"`
- Lt *uint32 `protobuf:"varint,2,opt,name=lt,proto3,oneof" json:"lt"`
- Lte *uint32 `protobuf:"varint,3,opt,name=lte,proto3,oneof" json:"lte"`
- Gt *uint32 `protobuf:"varint,4,opt,name=gt,proto3,oneof" json:"gt"`
- Gte *uint32 `protobuf:"varint,5,opt,name=gte,proto3,oneof" json:"gte"`
- In []uint32 `protobuf:"varint,6,rep,packed,name=in,proto3" json:"in"`
- NotIn []uint32 `protobuf:"varint,7,rep,packed,name=not_in,json=notIn,proto3" json:"not_in"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *UInt32Rules) Reset() {
- *x = UInt32Rules{}
- mi := &file_kuban_api_validate_validate_proto_msgTypes[9]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *UInt32Rules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*UInt32Rules) ProtoMessage() {}
- func (x *UInt32Rules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_validate_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 UInt32Rules.ProtoReflect.Descriptor instead.
- func (*UInt32Rules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_validate_proto_rawDescGZIP(), []int{9}
- }
- func (x *UInt32Rules) GetConst() uint32 {
- if x != nil && x.Const != nil {
- return *x.Const
- }
- return 0
- }
- func (x *UInt32Rules) GetLt() uint32 {
- if x != nil && x.Lt != nil {
- return *x.Lt
- }
- return 0
- }
- func (x *UInt32Rules) GetLte() uint32 {
- if x != nil && x.Lte != nil {
- return *x.Lte
- }
- return 0
- }
- func (x *UInt32Rules) GetGt() uint32 {
- if x != nil && x.Gt != nil {
- return *x.Gt
- }
- return 0
- }
- func (x *UInt32Rules) GetGte() uint32 {
- if x != nil && x.Gte != nil {
- return *x.Gte
- }
- return 0
- }
- func (x *UInt32Rules) GetIn() []uint32 {
- if x != nil {
- return x.In
- }
- return nil
- }
- func (x *UInt32Rules) GetNotIn() []uint32 {
- if x != nil {
- return x.NotIn
- }
- return nil
- }
- // UInt64 验证规则
- type UInt64Rules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Const *uint64 `protobuf:"varint,1,opt,name=const,proto3,oneof" json:"const"`
- Lt *uint64 `protobuf:"varint,2,opt,name=lt,proto3,oneof" json:"lt"`
- Lte *uint64 `protobuf:"varint,3,opt,name=lte,proto3,oneof" json:"lte"`
- Gt *uint64 `protobuf:"varint,4,opt,name=gt,proto3,oneof" json:"gt"`
- Gte *uint64 `protobuf:"varint,5,opt,name=gte,proto3,oneof" json:"gte"`
- In []uint64 `protobuf:"varint,6,rep,packed,name=in,proto3" json:"in"`
- NotIn []uint64 `protobuf:"varint,7,rep,packed,name=not_in,json=notIn,proto3" json:"not_in"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *UInt64Rules) Reset() {
- *x = UInt64Rules{}
- mi := &file_kuban_api_validate_validate_proto_msgTypes[10]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *UInt64Rules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*UInt64Rules) ProtoMessage() {}
- func (x *UInt64Rules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_validate_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 UInt64Rules.ProtoReflect.Descriptor instead.
- func (*UInt64Rules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_validate_proto_rawDescGZIP(), []int{10}
- }
- func (x *UInt64Rules) GetConst() uint64 {
- if x != nil && x.Const != nil {
- return *x.Const
- }
- return 0
- }
- func (x *UInt64Rules) GetLt() uint64 {
- if x != nil && x.Lt != nil {
- return *x.Lt
- }
- return 0
- }
- func (x *UInt64Rules) GetLte() uint64 {
- if x != nil && x.Lte != nil {
- return *x.Lte
- }
- return 0
- }
- func (x *UInt64Rules) GetGt() uint64 {
- if x != nil && x.Gt != nil {
- return *x.Gt
- }
- return 0
- }
- func (x *UInt64Rules) GetGte() uint64 {
- if x != nil && x.Gte != nil {
- return *x.Gte
- }
- return 0
- }
- func (x *UInt64Rules) GetIn() []uint64 {
- if x != nil {
- return x.In
- }
- return nil
- }
- func (x *UInt64Rules) GetNotIn() []uint64 {
- if x != nil {
- return x.NotIn
- }
- return nil
- }
- // SInt32 验证规则
- type SInt32Rules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Const *int32 `protobuf:"zigzag32,1,opt,name=const,proto3,oneof" json:"const"`
- Lt *int32 `protobuf:"zigzag32,2,opt,name=lt,proto3,oneof" json:"lt"`
- Lte *int32 `protobuf:"zigzag32,3,opt,name=lte,proto3,oneof" json:"lte"`
- Gt *int32 `protobuf:"zigzag32,4,opt,name=gt,proto3,oneof" json:"gt"`
- Gte *int32 `protobuf:"zigzag32,5,opt,name=gte,proto3,oneof" json:"gte"`
- In []int32 `protobuf:"zigzag32,6,rep,packed,name=in,proto3" json:"in"`
- NotIn []int32 `protobuf:"zigzag32,7,rep,packed,name=not_in,json=notIn,proto3" json:"not_in"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *SInt32Rules) Reset() {
- *x = SInt32Rules{}
- mi := &file_kuban_api_validate_validate_proto_msgTypes[11]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *SInt32Rules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*SInt32Rules) ProtoMessage() {}
- func (x *SInt32Rules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_validate_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 SInt32Rules.ProtoReflect.Descriptor instead.
- func (*SInt32Rules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_validate_proto_rawDescGZIP(), []int{11}
- }
- func (x *SInt32Rules) GetConst() int32 {
- if x != nil && x.Const != nil {
- return *x.Const
- }
- return 0
- }
- func (x *SInt32Rules) GetLt() int32 {
- if x != nil && x.Lt != nil {
- return *x.Lt
- }
- return 0
- }
- func (x *SInt32Rules) GetLte() int32 {
- if x != nil && x.Lte != nil {
- return *x.Lte
- }
- return 0
- }
- func (x *SInt32Rules) GetGt() int32 {
- if x != nil && x.Gt != nil {
- return *x.Gt
- }
- return 0
- }
- func (x *SInt32Rules) GetGte() int32 {
- if x != nil && x.Gte != nil {
- return *x.Gte
- }
- return 0
- }
- func (x *SInt32Rules) GetIn() []int32 {
- if x != nil {
- return x.In
- }
- return nil
- }
- func (x *SInt32Rules) GetNotIn() []int32 {
- if x != nil {
- return x.NotIn
- }
- return nil
- }
- // SInt64 验证规则
- type SInt64Rules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Const *int64 `protobuf:"zigzag64,1,opt,name=const,proto3,oneof" json:"const"`
- Lt *int64 `protobuf:"zigzag64,2,opt,name=lt,proto3,oneof" json:"lt"`
- Lte *int64 `protobuf:"zigzag64,3,opt,name=lte,proto3,oneof" json:"lte"`
- Gt *int64 `protobuf:"zigzag64,4,opt,name=gt,proto3,oneof" json:"gt"`
- Gte *int64 `protobuf:"zigzag64,5,opt,name=gte,proto3,oneof" json:"gte"`
- In []int64 `protobuf:"zigzag64,6,rep,packed,name=in,proto3" json:"in"`
- NotIn []int64 `protobuf:"zigzag64,7,rep,packed,name=not_in,json=notIn,proto3" json:"not_in"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *SInt64Rules) Reset() {
- *x = SInt64Rules{}
- mi := &file_kuban_api_validate_validate_proto_msgTypes[12]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *SInt64Rules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*SInt64Rules) ProtoMessage() {}
- func (x *SInt64Rules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_validate_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 SInt64Rules.ProtoReflect.Descriptor instead.
- func (*SInt64Rules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_validate_proto_rawDescGZIP(), []int{12}
- }
- func (x *SInt64Rules) GetConst() int64 {
- if x != nil && x.Const != nil {
- return *x.Const
- }
- return 0
- }
- func (x *SInt64Rules) GetLt() int64 {
- if x != nil && x.Lt != nil {
- return *x.Lt
- }
- return 0
- }
- func (x *SInt64Rules) GetLte() int64 {
- if x != nil && x.Lte != nil {
- return *x.Lte
- }
- return 0
- }
- func (x *SInt64Rules) GetGt() int64 {
- if x != nil && x.Gt != nil {
- return *x.Gt
- }
- return 0
- }
- func (x *SInt64Rules) GetGte() int64 {
- if x != nil && x.Gte != nil {
- return *x.Gte
- }
- return 0
- }
- func (x *SInt64Rules) GetIn() []int64 {
- if x != nil {
- return x.In
- }
- return nil
- }
- func (x *SInt64Rules) GetNotIn() []int64 {
- if x != nil {
- return x.NotIn
- }
- return nil
- }
- // Fixed32 验证规则
- type Fixed32Rules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Const *uint32 `protobuf:"fixed32,1,opt,name=const,proto3,oneof" json:"const"`
- Lt *uint32 `protobuf:"fixed32,2,opt,name=lt,proto3,oneof" json:"lt"`
- Lte *uint32 `protobuf:"fixed32,3,opt,name=lte,proto3,oneof" json:"lte"`
- Gt *uint32 `protobuf:"fixed32,4,opt,name=gt,proto3,oneof" json:"gt"`
- Gte *uint32 `protobuf:"fixed32,5,opt,name=gte,proto3,oneof" json:"gte"`
- In []uint32 `protobuf:"fixed32,6,rep,packed,name=in,proto3" json:"in"`
- NotIn []uint32 `protobuf:"fixed32,7,rep,packed,name=not_in,json=notIn,proto3" json:"not_in"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *Fixed32Rules) Reset() {
- *x = Fixed32Rules{}
- mi := &file_kuban_api_validate_validate_proto_msgTypes[13]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *Fixed32Rules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*Fixed32Rules) ProtoMessage() {}
- func (x *Fixed32Rules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_validate_proto_msgTypes[13]
- 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 Fixed32Rules.ProtoReflect.Descriptor instead.
- func (*Fixed32Rules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_validate_proto_rawDescGZIP(), []int{13}
- }
- func (x *Fixed32Rules) GetConst() uint32 {
- if x != nil && x.Const != nil {
- return *x.Const
- }
- return 0
- }
- func (x *Fixed32Rules) GetLt() uint32 {
- if x != nil && x.Lt != nil {
- return *x.Lt
- }
- return 0
- }
- func (x *Fixed32Rules) GetLte() uint32 {
- if x != nil && x.Lte != nil {
- return *x.Lte
- }
- return 0
- }
- func (x *Fixed32Rules) GetGt() uint32 {
- if x != nil && x.Gt != nil {
- return *x.Gt
- }
- return 0
- }
- func (x *Fixed32Rules) GetGte() uint32 {
- if x != nil && x.Gte != nil {
- return *x.Gte
- }
- return 0
- }
- func (x *Fixed32Rules) GetIn() []uint32 {
- if x != nil {
- return x.In
- }
- return nil
- }
- func (x *Fixed32Rules) GetNotIn() []uint32 {
- if x != nil {
- return x.NotIn
- }
- return nil
- }
- // Fixed64 验证规则
- type Fixed64Rules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Const *uint64 `protobuf:"fixed64,1,opt,name=const,proto3,oneof" json:"const"`
- Lt *uint64 `protobuf:"fixed64,2,opt,name=lt,proto3,oneof" json:"lt"`
- Lte *uint64 `protobuf:"fixed64,3,opt,name=lte,proto3,oneof" json:"lte"`
- Gt *uint64 `protobuf:"fixed64,4,opt,name=gt,proto3,oneof" json:"gt"`
- Gte *uint64 `protobuf:"fixed64,5,opt,name=gte,proto3,oneof" json:"gte"`
- In []uint64 `protobuf:"fixed64,6,rep,packed,name=in,proto3" json:"in"`
- NotIn []uint64 `protobuf:"fixed64,7,rep,packed,name=not_in,json=notIn,proto3" json:"not_in"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *Fixed64Rules) Reset() {
- *x = Fixed64Rules{}
- mi := &file_kuban_api_validate_validate_proto_msgTypes[14]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *Fixed64Rules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*Fixed64Rules) ProtoMessage() {}
- func (x *Fixed64Rules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_validate_proto_msgTypes[14]
- 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 Fixed64Rules.ProtoReflect.Descriptor instead.
- func (*Fixed64Rules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_validate_proto_rawDescGZIP(), []int{14}
- }
- func (x *Fixed64Rules) GetConst() uint64 {
- if x != nil && x.Const != nil {
- return *x.Const
- }
- return 0
- }
- func (x *Fixed64Rules) GetLt() uint64 {
- if x != nil && x.Lt != nil {
- return *x.Lt
- }
- return 0
- }
- func (x *Fixed64Rules) GetLte() uint64 {
- if x != nil && x.Lte != nil {
- return *x.Lte
- }
- return 0
- }
- func (x *Fixed64Rules) GetGt() uint64 {
- if x != nil && x.Gt != nil {
- return *x.Gt
- }
- return 0
- }
- func (x *Fixed64Rules) GetGte() uint64 {
- if x != nil && x.Gte != nil {
- return *x.Gte
- }
- return 0
- }
- func (x *Fixed64Rules) GetIn() []uint64 {
- if x != nil {
- return x.In
- }
- return nil
- }
- func (x *Fixed64Rules) GetNotIn() []uint64 {
- if x != nil {
- return x.NotIn
- }
- return nil
- }
- // SFixed32 验证规则
- type SFixed32Rules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Const *int32 `protobuf:"fixed32,1,opt,name=const,proto3,oneof" json:"const"`
- Lt *int32 `protobuf:"fixed32,2,opt,name=lt,proto3,oneof" json:"lt"`
- Lte *int32 `protobuf:"fixed32,3,opt,name=lte,proto3,oneof" json:"lte"`
- Gt *int32 `protobuf:"fixed32,4,opt,name=gt,proto3,oneof" json:"gt"`
- Gte *int32 `protobuf:"fixed32,5,opt,name=gte,proto3,oneof" json:"gte"`
- In []int32 `protobuf:"fixed32,6,rep,packed,name=in,proto3" json:"in"`
- NotIn []int32 `protobuf:"fixed32,7,rep,packed,name=not_in,json=notIn,proto3" json:"not_in"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *SFixed32Rules) Reset() {
- *x = SFixed32Rules{}
- mi := &file_kuban_api_validate_validate_proto_msgTypes[15]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *SFixed32Rules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*SFixed32Rules) ProtoMessage() {}
- func (x *SFixed32Rules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_validate_proto_msgTypes[15]
- 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 SFixed32Rules.ProtoReflect.Descriptor instead.
- func (*SFixed32Rules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_validate_proto_rawDescGZIP(), []int{15}
- }
- func (x *SFixed32Rules) GetConst() int32 {
- if x != nil && x.Const != nil {
- return *x.Const
- }
- return 0
- }
- func (x *SFixed32Rules) GetLt() int32 {
- if x != nil && x.Lt != nil {
- return *x.Lt
- }
- return 0
- }
- func (x *SFixed32Rules) GetLte() int32 {
- if x != nil && x.Lte != nil {
- return *x.Lte
- }
- return 0
- }
- func (x *SFixed32Rules) GetGt() int32 {
- if x != nil && x.Gt != nil {
- return *x.Gt
- }
- return 0
- }
- func (x *SFixed32Rules) GetGte() int32 {
- if x != nil && x.Gte != nil {
- return *x.Gte
- }
- return 0
- }
- func (x *SFixed32Rules) GetIn() []int32 {
- if x != nil {
- return x.In
- }
- return nil
- }
- func (x *SFixed32Rules) GetNotIn() []int32 {
- if x != nil {
- return x.NotIn
- }
- return nil
- }
- // SFixed64 验证规则
- type SFixed64Rules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Const *int64 `protobuf:"fixed64,1,opt,name=const,proto3,oneof" json:"const"`
- Lt *int64 `protobuf:"fixed64,2,opt,name=lt,proto3,oneof" json:"lt"`
- Lte *int64 `protobuf:"fixed64,3,opt,name=lte,proto3,oneof" json:"lte"`
- Gt *int64 `protobuf:"fixed64,4,opt,name=gt,proto3,oneof" json:"gt"`
- Gte *int64 `protobuf:"fixed64,5,opt,name=gte,proto3,oneof" json:"gte"`
- In []int64 `protobuf:"fixed64,6,rep,packed,name=in,proto3" json:"in"`
- NotIn []int64 `protobuf:"fixed64,7,rep,packed,name=not_in,json=notIn,proto3" json:"not_in"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *SFixed64Rules) Reset() {
- *x = SFixed64Rules{}
- mi := &file_kuban_api_validate_validate_proto_msgTypes[16]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *SFixed64Rules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*SFixed64Rules) ProtoMessage() {}
- func (x *SFixed64Rules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_validate_proto_msgTypes[16]
- 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 SFixed64Rules.ProtoReflect.Descriptor instead.
- func (*SFixed64Rules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_validate_proto_rawDescGZIP(), []int{16}
- }
- func (x *SFixed64Rules) GetConst() int64 {
- if x != nil && x.Const != nil {
- return *x.Const
- }
- return 0
- }
- func (x *SFixed64Rules) GetLt() int64 {
- if x != nil && x.Lt != nil {
- return *x.Lt
- }
- return 0
- }
- func (x *SFixed64Rules) GetLte() int64 {
- if x != nil && x.Lte != nil {
- return *x.Lte
- }
- return 0
- }
- func (x *SFixed64Rules) GetGt() int64 {
- if x != nil && x.Gt != nil {
- return *x.Gt
- }
- return 0
- }
- func (x *SFixed64Rules) GetGte() int64 {
- if x != nil && x.Gte != nil {
- return *x.Gte
- }
- return 0
- }
- func (x *SFixed64Rules) GetIn() []int64 {
- if x != nil {
- return x.In
- }
- return nil
- }
- func (x *SFixed64Rules) GetNotIn() []int64 {
- if x != nil {
- return x.NotIn
- }
- return nil
- }
- // 布尔值验证规则
- type BoolRules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Const *bool `protobuf:"varint,1,opt,name=const,proto3,oneof" json:"const"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *BoolRules) Reset() {
- *x = BoolRules{}
- mi := &file_kuban_api_validate_validate_proto_msgTypes[17]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *BoolRules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*BoolRules) ProtoMessage() {}
- func (x *BoolRules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_validate_proto_msgTypes[17]
- 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 BoolRules.ProtoReflect.Descriptor instead.
- func (*BoolRules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_validate_proto_rawDescGZIP(), []int{17}
- }
- func (x *BoolRules) GetConst() bool {
- if x != nil && x.Const != nil {
- return *x.Const
- }
- return false
- }
- // 字符串验证规则 - 增强的中文支持
- type StringRules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 常量值
- Const *string `protobuf:"bytes,1,opt,name=const,proto3,oneof" json:"const"`
- // 长度限制(字符数,非字节数)
- Len *uint64 `protobuf:"varint,2,opt,name=len,proto3,oneof" json:"len"`
- MinLen *uint64 `protobuf:"varint,3,opt,name=min_len,json=minLen,proto3,oneof" json:"min_len"`
- MaxLen *uint64 `protobuf:"varint,4,opt,name=max_len,json=maxLen,proto3,oneof" json:"max_len"`
- // 字节长度限制
- LenBytes *uint64 `protobuf:"varint,5,opt,name=len_bytes,json=lenBytes,proto3,oneof" json:"len_bytes"`
- MinBytes *uint64 `protobuf:"varint,6,opt,name=min_bytes,json=minBytes,proto3,oneof" json:"min_bytes"`
- MaxBytes *uint64 `protobuf:"varint,7,opt,name=max_bytes,json=maxBytes,proto3,oneof" json:"max_bytes"`
- // 模式匹配
- Pattern *string `protobuf:"bytes,8,opt,name=pattern,proto3,oneof" json:"pattern"` // 正则表达式
- // 前缀/后缀
- Prefix *string `protobuf:"bytes,9,opt,name=prefix,proto3,oneof" json:"prefix"`
- Suffix *string `protobuf:"bytes,10,opt,name=suffix,proto3,oneof" json:"suffix"`
- // 包含/不包含
- Contains *string `protobuf:"bytes,11,opt,name=contains,proto3,oneof" json:"contains"`
- NotContains *string `protobuf:"bytes,12,opt,name=not_contains,json=notContains,proto3,oneof" json:"not_contains"`
- // 在值列表中
- In []string `protobuf:"bytes,13,rep,name=in,proto3" json:"in"`
- NotIn []string `protobuf:"bytes,14,rep,name=not_in,json=notIn,proto3" json:"not_in"`
- // 预定义格式(优化设计 - 更简洁)
- //
- // Types that are valid to be assigned to WellKnown:
- //
- // *StringRules_Email
- // *StringRules_Hostname
- // *StringRules_Ip
- // *StringRules_Ipv4
- // *StringRules_Ipv6
- // *StringRules_Uri
- // *StringRules_UriRef
- // *StringRules_Uuid
- // *StringRules_ChineseMobile
- // *StringRules_ChineseIdCard
- // *StringRules_ChineseName
- // *StringRules_ChinesePostcode
- WellKnown isStringRules_WellKnown `protobuf_oneof:"well_known"`
- // 字符类型限制
- Ascii *bool `protobuf:"varint,40,opt,name=ascii,proto3,oneof" json:"ascii"` // 仅 ASCII 字符
- Printable *bool `protobuf:"varint,41,opt,name=printable,proto3,oneof" json:"printable"` // 可打印字符
- Alpha *bool `protobuf:"varint,42,opt,name=alpha,proto3,oneof" json:"alpha"` // 仅字母
- Alphanumeric *bool `protobuf:"varint,43,opt,name=alphanumeric,proto3,oneof" json:"alphanumeric"` // 字母和数字
- Numeric *bool `protobuf:"varint,44,opt,name=numeric,proto3,oneof" json:"numeric"` // 仅数字
- // 大小写要求
- Lowercase *bool `protobuf:"varint,50,opt,name=lowercase,proto3,oneof" json:"lowercase"` // 仅小写
- Uppercase *bool `protobuf:"varint,51,opt,name=uppercase,proto3,oneof" json:"uppercase"` // 仅大写
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *StringRules) Reset() {
- *x = StringRules{}
- mi := &file_kuban_api_validate_validate_proto_msgTypes[18]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *StringRules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*StringRules) ProtoMessage() {}
- func (x *StringRules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_validate_proto_msgTypes[18]
- 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 StringRules.ProtoReflect.Descriptor instead.
- func (*StringRules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_validate_proto_rawDescGZIP(), []int{18}
- }
- func (x *StringRules) GetConst() string {
- if x != nil && x.Const != nil {
- return *x.Const
- }
- return ""
- }
- func (x *StringRules) GetLen() uint64 {
- if x != nil && x.Len != nil {
- return *x.Len
- }
- return 0
- }
- func (x *StringRules) GetMinLen() uint64 {
- if x != nil && x.MinLen != nil {
- return *x.MinLen
- }
- return 0
- }
- func (x *StringRules) GetMaxLen() uint64 {
- if x != nil && x.MaxLen != nil {
- return *x.MaxLen
- }
- return 0
- }
- func (x *StringRules) GetLenBytes() uint64 {
- if x != nil && x.LenBytes != nil {
- return *x.LenBytes
- }
- return 0
- }
- func (x *StringRules) GetMinBytes() uint64 {
- if x != nil && x.MinBytes != nil {
- return *x.MinBytes
- }
- return 0
- }
- func (x *StringRules) GetMaxBytes() uint64 {
- if x != nil && x.MaxBytes != nil {
- return *x.MaxBytes
- }
- return 0
- }
- func (x *StringRules) GetPattern() string {
- if x != nil && x.Pattern != nil {
- return *x.Pattern
- }
- return ""
- }
- func (x *StringRules) GetPrefix() string {
- if x != nil && x.Prefix != nil {
- return *x.Prefix
- }
- return ""
- }
- func (x *StringRules) GetSuffix() string {
- if x != nil && x.Suffix != nil {
- return *x.Suffix
- }
- return ""
- }
- func (x *StringRules) GetContains() string {
- if x != nil && x.Contains != nil {
- return *x.Contains
- }
- return ""
- }
- func (x *StringRules) GetNotContains() string {
- if x != nil && x.NotContains != nil {
- return *x.NotContains
- }
- return ""
- }
- func (x *StringRules) GetIn() []string {
- if x != nil {
- return x.In
- }
- return nil
- }
- func (x *StringRules) GetNotIn() []string {
- if x != nil {
- return x.NotIn
- }
- return nil
- }
- func (x *StringRules) GetWellKnown() isStringRules_WellKnown {
- if x != nil {
- return x.WellKnown
- }
- return nil
- }
- func (x *StringRules) GetEmail() bool {
- if x != nil {
- if x, ok := x.WellKnown.(*StringRules_Email); ok {
- return x.Email
- }
- }
- return false
- }
- func (x *StringRules) GetHostname() bool {
- if x != nil {
- if x, ok := x.WellKnown.(*StringRules_Hostname); ok {
- return x.Hostname
- }
- }
- return false
- }
- func (x *StringRules) GetIp() bool {
- if x != nil {
- if x, ok := x.WellKnown.(*StringRules_Ip); ok {
- return x.Ip
- }
- }
- return false
- }
- func (x *StringRules) GetIpv4() bool {
- if x != nil {
- if x, ok := x.WellKnown.(*StringRules_Ipv4); ok {
- return x.Ipv4
- }
- }
- return false
- }
- func (x *StringRules) GetIpv6() bool {
- if x != nil {
- if x, ok := x.WellKnown.(*StringRules_Ipv6); ok {
- return x.Ipv6
- }
- }
- return false
- }
- func (x *StringRules) GetUri() bool {
- if x != nil {
- if x, ok := x.WellKnown.(*StringRules_Uri); ok {
- return x.Uri
- }
- }
- return false
- }
- func (x *StringRules) GetUriRef() bool {
- if x != nil {
- if x, ok := x.WellKnown.(*StringRules_UriRef); ok {
- return x.UriRef
- }
- }
- return false
- }
- func (x *StringRules) GetUuid() bool {
- if x != nil {
- if x, ok := x.WellKnown.(*StringRules_Uuid); ok {
- return x.Uuid
- }
- }
- return false
- }
- func (x *StringRules) GetChineseMobile() bool {
- if x != nil {
- if x, ok := x.WellKnown.(*StringRules_ChineseMobile); ok {
- return x.ChineseMobile
- }
- }
- return false
- }
- func (x *StringRules) GetChineseIdCard() bool {
- if x != nil {
- if x, ok := x.WellKnown.(*StringRules_ChineseIdCard); ok {
- return x.ChineseIdCard
- }
- }
- return false
- }
- func (x *StringRules) GetChineseName() bool {
- if x != nil {
- if x, ok := x.WellKnown.(*StringRules_ChineseName); ok {
- return x.ChineseName
- }
- }
- return false
- }
- func (x *StringRules) GetChinesePostcode() bool {
- if x != nil {
- if x, ok := x.WellKnown.(*StringRules_ChinesePostcode); ok {
- return x.ChinesePostcode
- }
- }
- return false
- }
- func (x *StringRules) GetAscii() bool {
- if x != nil && x.Ascii != nil {
- return *x.Ascii
- }
- return false
- }
- func (x *StringRules) GetPrintable() bool {
- if x != nil && x.Printable != nil {
- return *x.Printable
- }
- return false
- }
- func (x *StringRules) GetAlpha() bool {
- if x != nil && x.Alpha != nil {
- return *x.Alpha
- }
- return false
- }
- func (x *StringRules) GetAlphanumeric() bool {
- if x != nil && x.Alphanumeric != nil {
- return *x.Alphanumeric
- }
- return false
- }
- func (x *StringRules) GetNumeric() bool {
- if x != nil && x.Numeric != nil {
- return *x.Numeric
- }
- return false
- }
- func (x *StringRules) GetLowercase() bool {
- if x != nil && x.Lowercase != nil {
- return *x.Lowercase
- }
- return false
- }
- func (x *StringRules) GetUppercase() bool {
- if x != nil && x.Uppercase != nil {
- return *x.Uppercase
- }
- return false
- }
- type isStringRules_WellKnown interface {
- isStringRules_WellKnown()
- }
- type StringRules_Email struct {
- Email bool `protobuf:"varint,20,opt,name=email,proto3,oneof"` // 邮箱格式
- }
- type StringRules_Hostname struct {
- Hostname bool `protobuf:"varint,21,opt,name=hostname,proto3,oneof"` // 主机名
- }
- type StringRules_Ip struct {
- Ip bool `protobuf:"varint,22,opt,name=ip,proto3,oneof"` // IP 地址(v4/v6)
- }
- type StringRules_Ipv4 struct {
- Ipv4 bool `protobuf:"varint,23,opt,name=ipv4,proto3,oneof"` // IPv4
- }
- type StringRules_Ipv6 struct {
- Ipv6 bool `protobuf:"varint,24,opt,name=ipv6,proto3,oneof"` // IPv6
- }
- type StringRules_Uri struct {
- Uri bool `protobuf:"varint,25,opt,name=uri,proto3,oneof"` // URI
- }
- type StringRules_UriRef struct {
- UriRef bool `protobuf:"varint,26,opt,name=uri_ref,json=uriRef,proto3,oneof"` // URI 引用
- }
- type StringRules_Uuid struct {
- Uuid bool `protobuf:"varint,27,opt,name=uuid,proto3,oneof"` // UUID
- }
- type StringRules_ChineseMobile struct {
- // 中文业务格式 - 这是优化点!
- ChineseMobile bool `protobuf:"varint,30,opt,name=chinese_mobile,json=chineseMobile,proto3,oneof"` // 中国手机号
- }
- type StringRules_ChineseIdCard struct {
- ChineseIdCard bool `protobuf:"varint,31,opt,name=chinese_id_card,json=chineseIdCard,proto3,oneof"` // 中国身份证号
- }
- type StringRules_ChineseName struct {
- ChineseName bool `protobuf:"varint,32,opt,name=chinese_name,json=chineseName,proto3,oneof"` // 中文姓名
- }
- type StringRules_ChinesePostcode struct {
- ChinesePostcode bool `protobuf:"varint,33,opt,name=chinese_postcode,json=chinesePostcode,proto3,oneof"` // 中国邮政编码
- }
- func (*StringRules_Email) isStringRules_WellKnown() {}
- func (*StringRules_Hostname) isStringRules_WellKnown() {}
- func (*StringRules_Ip) isStringRules_WellKnown() {}
- func (*StringRules_Ipv4) isStringRules_WellKnown() {}
- func (*StringRules_Ipv6) isStringRules_WellKnown() {}
- func (*StringRules_Uri) isStringRules_WellKnown() {}
- func (*StringRules_UriRef) isStringRules_WellKnown() {}
- func (*StringRules_Uuid) isStringRules_WellKnown() {}
- func (*StringRules_ChineseMobile) isStringRules_WellKnown() {}
- func (*StringRules_ChineseIdCard) isStringRules_WellKnown() {}
- func (*StringRules_ChineseName) isStringRules_WellKnown() {}
- func (*StringRules_ChinesePostcode) isStringRules_WellKnown() {}
- // 字节数组验证规则
- type BytesRules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Const []byte `protobuf:"bytes,1,opt,name=const,proto3,oneof" json:"const"`
- Len *uint64 `protobuf:"varint,2,opt,name=len,proto3,oneof" json:"len"`
- MinLen *uint64 `protobuf:"varint,3,opt,name=min_len,json=minLen,proto3,oneof" json:"min_len"`
- MaxLen *uint64 `protobuf:"varint,4,opt,name=max_len,json=maxLen,proto3,oneof" json:"max_len"`
- Pattern []byte `protobuf:"bytes,5,opt,name=pattern,proto3,oneof" json:"pattern"`
- Prefix []byte `protobuf:"bytes,6,opt,name=prefix,proto3,oneof" json:"prefix"`
- Suffix []byte `protobuf:"bytes,7,opt,name=suffix,proto3,oneof" json:"suffix"`
- Contains []byte `protobuf:"bytes,8,opt,name=contains,proto3,oneof" json:"contains"`
- In [][]byte `protobuf:"bytes,9,rep,name=in,proto3" json:"in"`
- NotIn [][]byte `protobuf:"bytes,10,rep,name=not_in,json=notIn,proto3" json:"not_in"`
- // Well-known 格式
- //
- // Types that are valid to be assigned to WellKnown:
- //
- // *BytesRules_Ip
- // *BytesRules_Ipv4
- // *BytesRules_Ipv6
- WellKnown isBytesRules_WellKnown `protobuf_oneof:"well_known"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *BytesRules) Reset() {
- *x = BytesRules{}
- mi := &file_kuban_api_validate_validate_proto_msgTypes[19]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *BytesRules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*BytesRules) ProtoMessage() {}
- func (x *BytesRules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_validate_proto_msgTypes[19]
- 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 BytesRules.ProtoReflect.Descriptor instead.
- func (*BytesRules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_validate_proto_rawDescGZIP(), []int{19}
- }
- func (x *BytesRules) GetConst() []byte {
- if x != nil {
- return x.Const
- }
- return nil
- }
- func (x *BytesRules) GetLen() uint64 {
- if x != nil && x.Len != nil {
- return *x.Len
- }
- return 0
- }
- func (x *BytesRules) GetMinLen() uint64 {
- if x != nil && x.MinLen != nil {
- return *x.MinLen
- }
- return 0
- }
- func (x *BytesRules) GetMaxLen() uint64 {
- if x != nil && x.MaxLen != nil {
- return *x.MaxLen
- }
- return 0
- }
- func (x *BytesRules) GetPattern() []byte {
- if x != nil {
- return x.Pattern
- }
- return nil
- }
- func (x *BytesRules) GetPrefix() []byte {
- if x != nil {
- return x.Prefix
- }
- return nil
- }
- func (x *BytesRules) GetSuffix() []byte {
- if x != nil {
- return x.Suffix
- }
- return nil
- }
- func (x *BytesRules) GetContains() []byte {
- if x != nil {
- return x.Contains
- }
- return nil
- }
- func (x *BytesRules) GetIn() [][]byte {
- if x != nil {
- return x.In
- }
- return nil
- }
- func (x *BytesRules) GetNotIn() [][]byte {
- if x != nil {
- return x.NotIn
- }
- return nil
- }
- func (x *BytesRules) GetWellKnown() isBytesRules_WellKnown {
- if x != nil {
- return x.WellKnown
- }
- return nil
- }
- func (x *BytesRules) GetIp() bool {
- if x != nil {
- if x, ok := x.WellKnown.(*BytesRules_Ip); ok {
- return x.Ip
- }
- }
- return false
- }
- func (x *BytesRules) GetIpv4() bool {
- if x != nil {
- if x, ok := x.WellKnown.(*BytesRules_Ipv4); ok {
- return x.Ipv4
- }
- }
- return false
- }
- func (x *BytesRules) GetIpv6() bool {
- if x != nil {
- if x, ok := x.WellKnown.(*BytesRules_Ipv6); ok {
- return x.Ipv6
- }
- }
- return false
- }
- type isBytesRules_WellKnown interface {
- isBytesRules_WellKnown()
- }
- type BytesRules_Ip struct {
- Ip bool `protobuf:"varint,20,opt,name=ip,proto3,oneof"`
- }
- type BytesRules_Ipv4 struct {
- Ipv4 bool `protobuf:"varint,21,opt,name=ipv4,proto3,oneof"`
- }
- type BytesRules_Ipv6 struct {
- Ipv6 bool `protobuf:"varint,22,opt,name=ipv6,proto3,oneof"`
- }
- func (*BytesRules_Ip) isBytesRules_WellKnown() {}
- func (*BytesRules_Ipv4) isBytesRules_WellKnown() {}
- func (*BytesRules_Ipv6) isBytesRules_WellKnown() {}
- // 枚举验证规则
- type EnumRules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Const *int32 `protobuf:"varint,1,opt,name=const,proto3,oneof" json:"const"`
- DefinedOnly *bool `protobuf:"varint,2,opt,name=defined_only,json=definedOnly,proto3,oneof" json:"defined_only"` // 仅允许已定义的枚举值
- In []int32 `protobuf:"varint,3,rep,packed,name=in,proto3" json:"in"`
- NotIn []int32 `protobuf:"varint,4,rep,packed,name=not_in,json=notIn,proto3" json:"not_in"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *EnumRules) Reset() {
- *x = EnumRules{}
- mi := &file_kuban_api_validate_validate_proto_msgTypes[20]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *EnumRules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*EnumRules) ProtoMessage() {}
- func (x *EnumRules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_validate_proto_msgTypes[20]
- 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 EnumRules.ProtoReflect.Descriptor instead.
- func (*EnumRules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_validate_proto_rawDescGZIP(), []int{20}
- }
- func (x *EnumRules) GetConst() int32 {
- if x != nil && x.Const != nil {
- return *x.Const
- }
- return 0
- }
- func (x *EnumRules) GetDefinedOnly() bool {
- if x != nil && x.DefinedOnly != nil {
- return *x.DefinedOnly
- }
- return false
- }
- func (x *EnumRules) GetIn() []int32 {
- if x != nil {
- return x.In
- }
- return nil
- }
- func (x *EnumRules) GetNotIn() []int32 {
- if x != nil {
- return x.NotIn
- }
- return nil
- }
- // 重复字段验证规则
- type RepeatedRules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- MinItems *uint64 `protobuf:"varint,1,opt,name=min_items,json=minItems,proto3,oneof" json:"min_items"` // 最小元素数
- MaxItems *uint64 `protobuf:"varint,2,opt,name=max_items,json=maxItems,proto3,oneof" json:"max_items"` // 最大元素数
- Unique *bool `protobuf:"varint,3,opt,name=unique,proto3,oneof" json:"unique"` // 元素必须唯一
- Items *FieldRules `protobuf:"bytes,4,opt,name=items,proto3" json:"items"` // 元素验证规则
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *RepeatedRules) Reset() {
- *x = RepeatedRules{}
- mi := &file_kuban_api_validate_validate_proto_msgTypes[21]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *RepeatedRules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*RepeatedRules) ProtoMessage() {}
- func (x *RepeatedRules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_validate_proto_msgTypes[21]
- 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 RepeatedRules.ProtoReflect.Descriptor instead.
- func (*RepeatedRules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_validate_proto_rawDescGZIP(), []int{21}
- }
- func (x *RepeatedRules) GetMinItems() uint64 {
- if x != nil && x.MinItems != nil {
- return *x.MinItems
- }
- return 0
- }
- func (x *RepeatedRules) GetMaxItems() uint64 {
- if x != nil && x.MaxItems != nil {
- return *x.MaxItems
- }
- return 0
- }
- func (x *RepeatedRules) GetUnique() bool {
- if x != nil && x.Unique != nil {
- return *x.Unique
- }
- return false
- }
- func (x *RepeatedRules) GetItems() *FieldRules {
- if x != nil {
- return x.Items
- }
- return nil
- }
- // Map 验证规则
- type MapRules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- MinPairs *uint64 `protobuf:"varint,1,opt,name=min_pairs,json=minPairs,proto3,oneof" json:"min_pairs"` // 最小键值对数
- MaxPairs *uint64 `protobuf:"varint,2,opt,name=max_pairs,json=maxPairs,proto3,oneof" json:"max_pairs"` // 最大键值对数
- Keys *FieldRules `protobuf:"bytes,3,opt,name=keys,proto3" json:"keys"` // 键验证规则
- Values *FieldRules `protobuf:"bytes,4,opt,name=values,proto3" json:"values"` // 值验证规则
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *MapRules) Reset() {
- *x = MapRules{}
- mi := &file_kuban_api_validate_validate_proto_msgTypes[22]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *MapRules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*MapRules) ProtoMessage() {}
- func (x *MapRules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_validate_proto_msgTypes[22]
- 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 MapRules.ProtoReflect.Descriptor instead.
- func (*MapRules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_validate_proto_rawDescGZIP(), []int{22}
- }
- func (x *MapRules) GetMinPairs() uint64 {
- if x != nil && x.MinPairs != nil {
- return *x.MinPairs
- }
- return 0
- }
- func (x *MapRules) GetMaxPairs() uint64 {
- if x != nil && x.MaxPairs != nil {
- return *x.MaxPairs
- }
- return 0
- }
- func (x *MapRules) GetKeys() *FieldRules {
- if x != nil {
- return x.Keys
- }
- return nil
- }
- func (x *MapRules) GetValues() *FieldRules {
- if x != nil {
- return x.Values
- }
- return nil
- }
- // Duration 验证规则
- type DurationRules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Required *bool `protobuf:"varint,1,opt,name=required,proto3,oneof" json:"required"`
- // Duration 常量
- ConstSeconds *int64 `protobuf:"varint,2,opt,name=const_seconds,json=constSeconds,proto3,oneof" json:"const_seconds"`
- ConstNanos *int32 `protobuf:"varint,3,opt,name=const_nanos,json=constNanos,proto3,oneof" json:"const_nanos"`
- // 范围限制
- LtSeconds *int64 `protobuf:"varint,4,opt,name=lt_seconds,json=ltSeconds,proto3,oneof" json:"lt_seconds"`
- LteSeconds *int64 `protobuf:"varint,5,opt,name=lte_seconds,json=lteSeconds,proto3,oneof" json:"lte_seconds"`
- GtSeconds *int64 `protobuf:"varint,6,opt,name=gt_seconds,json=gtSeconds,proto3,oneof" json:"gt_seconds"`
- GteSeconds *int64 `protobuf:"varint,7,opt,name=gte_seconds,json=gteSeconds,proto3,oneof" json:"gte_seconds"`
- // 在值列表中
- InSeconds []int64 `protobuf:"varint,8,rep,packed,name=in_seconds,json=inSeconds,proto3" json:"in_seconds"`
- NotInSeconds []int64 `protobuf:"varint,9,rep,packed,name=not_in_seconds,json=notInSeconds,proto3" json:"not_in_seconds"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *DurationRules) Reset() {
- *x = DurationRules{}
- mi := &file_kuban_api_validate_validate_proto_msgTypes[23]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *DurationRules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*DurationRules) ProtoMessage() {}
- func (x *DurationRules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_validate_proto_msgTypes[23]
- 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 DurationRules.ProtoReflect.Descriptor instead.
- func (*DurationRules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_validate_proto_rawDescGZIP(), []int{23}
- }
- func (x *DurationRules) GetRequired() bool {
- if x != nil && x.Required != nil {
- return *x.Required
- }
- return false
- }
- func (x *DurationRules) GetConstSeconds() int64 {
- if x != nil && x.ConstSeconds != nil {
- return *x.ConstSeconds
- }
- return 0
- }
- func (x *DurationRules) GetConstNanos() int32 {
- if x != nil && x.ConstNanos != nil {
- return *x.ConstNanos
- }
- return 0
- }
- func (x *DurationRules) GetLtSeconds() int64 {
- if x != nil && x.LtSeconds != nil {
- return *x.LtSeconds
- }
- return 0
- }
- func (x *DurationRules) GetLteSeconds() int64 {
- if x != nil && x.LteSeconds != nil {
- return *x.LteSeconds
- }
- return 0
- }
- func (x *DurationRules) GetGtSeconds() int64 {
- if x != nil && x.GtSeconds != nil {
- return *x.GtSeconds
- }
- return 0
- }
- func (x *DurationRules) GetGteSeconds() int64 {
- if x != nil && x.GteSeconds != nil {
- return *x.GteSeconds
- }
- return 0
- }
- func (x *DurationRules) GetInSeconds() []int64 {
- if x != nil {
- return x.InSeconds
- }
- return nil
- }
- func (x *DurationRules) GetNotInSeconds() []int64 {
- if x != nil {
- return x.NotInSeconds
- }
- return nil
- }
- // Timestamp 验证规则
- type TimestampRules struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Required *bool `protobuf:"varint,1,opt,name=required,proto3,oneof" json:"required"`
- // Timestamp 常量(Unix 秒)
- Const *int64 `protobuf:"varint,2,opt,name=const,proto3,oneof" json:"const"`
- // 范围限制
- Lt *int64 `protobuf:"varint,3,opt,name=lt,proto3,oneof" json:"lt"`
- Lte *int64 `protobuf:"varint,4,opt,name=lte,proto3,oneof" json:"lte"`
- Gt *int64 `protobuf:"varint,5,opt,name=gt,proto3,oneof" json:"gt"`
- Gte *int64 `protobuf:"varint,6,opt,name=gte,proto3,oneof" json:"gte"`
- // 相对时间限制
- LtNow *bool `protobuf:"varint,7,opt,name=lt_now,json=ltNow,proto3,oneof" json:"lt_now"` // 必须在当前时间之前
- GtNow *bool `protobuf:"varint,8,opt,name=gt_now,json=gtNow,proto3,oneof" json:"gt_now"` // 必须在当前时间之后
- // 时间范围(从现在开始的偏移量,秒)
- WithinSeconds *int64 `protobuf:"varint,9,opt,name=within_seconds,json=withinSeconds,proto3,oneof" json:"within_seconds"` // 必须在现在的 N 秒内
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *TimestampRules) Reset() {
- *x = TimestampRules{}
- mi := &file_kuban_api_validate_validate_proto_msgTypes[24]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *TimestampRules) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*TimestampRules) ProtoMessage() {}
- func (x *TimestampRules) ProtoReflect() protoreflect.Message {
- mi := &file_kuban_api_validate_validate_proto_msgTypes[24]
- 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 TimestampRules.ProtoReflect.Descriptor instead.
- func (*TimestampRules) Descriptor() ([]byte, []int) {
- return file_kuban_api_validate_validate_proto_rawDescGZIP(), []int{24}
- }
- func (x *TimestampRules) GetRequired() bool {
- if x != nil && x.Required != nil {
- return *x.Required
- }
- return false
- }
- func (x *TimestampRules) GetConst() int64 {
- if x != nil && x.Const != nil {
- return *x.Const
- }
- return 0
- }
- func (x *TimestampRules) GetLt() int64 {
- if x != nil && x.Lt != nil {
- return *x.Lt
- }
- return 0
- }
- func (x *TimestampRules) GetLte() int64 {
- if x != nil && x.Lte != nil {
- return *x.Lte
- }
- return 0
- }
- func (x *TimestampRules) GetGt() int64 {
- if x != nil && x.Gt != nil {
- return *x.Gt
- }
- return 0
- }
- func (x *TimestampRules) GetGte() int64 {
- if x != nil && x.Gte != nil {
- return *x.Gte
- }
- return 0
- }
- func (x *TimestampRules) GetLtNow() bool {
- if x != nil && x.LtNow != nil {
- return *x.LtNow
- }
- return false
- }
- func (x *TimestampRules) GetGtNow() bool {
- if x != nil && x.GtNow != nil {
- return *x.GtNow
- }
- return false
- }
- func (x *TimestampRules) GetWithinSeconds() int64 {
- if x != nil && x.WithinSeconds != nil {
- return *x.WithinSeconds
- }
- return 0
- }
- var file_kuban_api_validate_validate_proto_extTypes = []protoimpl.ExtensionInfo{
- {
- ExtendedType: (*descriptorpb.MessageOptions)(nil),
- ExtensionType: (*MessageRules)(nil),
- Field: 10100,
- Name: "kuban.api.validate.message",
- Tag: "bytes,10100,opt,name=message",
- Filename: "kuban/api/validate/validate.proto",
- },
- {
- ExtendedType: (*descriptorpb.FieldOptions)(nil),
- ExtensionType: (*FieldRules)(nil),
- Field: 10100,
- Name: "kuban.api.validate.field",
- Tag: "bytes,10100,opt,name=field",
- Filename: "kuban/api/validate/validate.proto",
- },
- {
- ExtendedType: (*descriptorpb.FieldOptions)(nil),
- ExtensionType: (*PredefinedRules)(nil),
- Field: 10101,
- Name: "kuban.api.validate.predefined",
- Tag: "bytes,10101,opt,name=predefined",
- Filename: "kuban/api/validate/validate.proto",
- },
- {
- ExtendedType: (*descriptorpb.OneofOptions)(nil),
- ExtensionType: (*OneofRules)(nil),
- Field: 10100,
- Name: "kuban.api.validate.oneof",
- Tag: "bytes,10100,opt,name=oneof",
- Filename: "kuban/api/validate/validate.proto",
- },
- }
- // Extension fields to descriptorpb.MessageOptions.
- var (
- // 消息级别的验证规则
- //
- // optional kuban.api.validate.MessageRules message = 10100;
- E_Message = &file_kuban_api_validate_validate_proto_extTypes[0]
- )
- // Extension fields to descriptorpb.FieldOptions.
- var (
- // 字段级别的验证规则
- //
- // optional kuban.api.validate.FieldRules field = 10100;
- E_Field = &file_kuban_api_validate_validate_proto_extTypes[1]
- // 预定义规则引用(用于扩展)
- //
- // optional kuban.api.validate.PredefinedRules predefined = 10101;
- E_Predefined = &file_kuban_api_validate_validate_proto_extTypes[2]
- )
- // Extension fields to descriptorpb.OneofOptions.
- var (
- // oneof 级别的验证规则
- //
- // optional kuban.api.validate.OneofRules oneof = 10100;
- E_Oneof = &file_kuban_api_validate_validate_proto_extTypes[3]
- )
- var File_kuban_api_validate_validate_proto protoreflect.FileDescriptor
- const file_kuban_api_validate_validate_proto_rawDesc = "" +
- "\n" +
- "!kuban/api/validate/validate.proto\x12\x12kuban.api.validate\x1a google/protobuf/descriptor.proto\"o\n" +
- "\x04Rule\x12\x0e\n" +
- "\x02id\x18\x01 \x01(\tR\x02id\x12\x18\n" +
- "\amessage\x18\x02 \x01(\tR\amessage\x12\x1d\n" +
- "\n" +
- "message_en\x18\x03 \x01(\tR\tmessageEn\x12\x1e\n" +
- "\n" +
- "expression\x18\x04 \x01(\tR\n" +
- "expression\"n\n" +
- "\fMessageRules\x12*\n" +
- "\x03cel\x18\x01 \x03(\v2\x18.kuban.api.validate.RuleR\x03cel\x12\x1a\n" +
- "\bdisabled\x18\x02 \x01(\bR\bdisabled\x12\x16\n" +
- "\x06groups\x18\x03 \x03(\tR\x06groups\"(\n" +
- "\n" +
- "OneofRules\x12\x1a\n" +
- "\brequired\x18\x01 \x01(\bR\brequired\"\xf8\v\n" +
- "\n" +
- "FieldRules\x12*\n" +
- "\x03cel\x18\x01 \x03(\v2\x18.kuban.api.validate.RuleR\x03cel\x12\x1a\n" +
- "\brequired\x18\x02 \x01(\bR\brequired\x126\n" +
- "\x06ignore\x18\x03 \x01(\x0e2\x1e.kuban.api.validate.IgnoreRuleR\x06ignore\x12\x16\n" +
- "\x06groups\x18\x04 \x03(\tR\x06groups\x12#\n" +
- "\rerror_message\x18\x05 \x01(\tR\ferrorMessage\x12(\n" +
- "\x10error_message_en\x18\x06 \x01(\tR\x0eerrorMessageEn\x12)\n" +
- "\x10required_message\x18\a \x01(\tR\x0frequiredMessage\x12.\n" +
- "\x13required_message_en\x18\b \x01(\tR\x11requiredMessageEn\x126\n" +
- "\x05float\x18\n" +
- " \x01(\v2\x1e.kuban.api.validate.FloatRulesH\x00R\x05float\x129\n" +
- "\x06double\x18\v \x01(\v2\x1f.kuban.api.validate.DoubleRulesH\x00R\x06double\x126\n" +
- "\x05int32\x18\f \x01(\v2\x1e.kuban.api.validate.Int32RulesH\x00R\x05int32\x126\n" +
- "\x05int64\x18\r \x01(\v2\x1e.kuban.api.validate.Int64RulesH\x00R\x05int64\x129\n" +
- "\x06uint32\x18\x0e \x01(\v2\x1f.kuban.api.validate.UInt32RulesH\x00R\x06uint32\x129\n" +
- "\x06uint64\x18\x0f \x01(\v2\x1f.kuban.api.validate.UInt64RulesH\x00R\x06uint64\x129\n" +
- "\x06sint32\x18\x10 \x01(\v2\x1f.kuban.api.validate.SInt32RulesH\x00R\x06sint32\x129\n" +
- "\x06sint64\x18\x11 \x01(\v2\x1f.kuban.api.validate.SInt64RulesH\x00R\x06sint64\x12<\n" +
- "\afixed32\x18\x12 \x01(\v2 .kuban.api.validate.Fixed32RulesH\x00R\afixed32\x12<\n" +
- "\afixed64\x18\x13 \x01(\v2 .kuban.api.validate.Fixed64RulesH\x00R\afixed64\x12?\n" +
- "\bsfixed32\x18\x14 \x01(\v2!.kuban.api.validate.SFixed32RulesH\x00R\bsfixed32\x12?\n" +
- "\bsfixed64\x18\x15 \x01(\v2!.kuban.api.validate.SFixed64RulesH\x00R\bsfixed64\x123\n" +
- "\x04bool\x18\x1e \x01(\v2\x1d.kuban.api.validate.BoolRulesH\x00R\x04bool\x129\n" +
- "\x06string\x18\x1f \x01(\v2\x1f.kuban.api.validate.StringRulesH\x00R\x06string\x126\n" +
- "\x05bytes\x18 \x01(\v2\x1e.kuban.api.validate.BytesRulesH\x00R\x05bytes\x123\n" +
- "\x04enum\x18( \x01(\v2\x1d.kuban.api.validate.EnumRulesH\x00R\x04enum\x12?\n" +
- "\brepeated\x18) \x01(\v2!.kuban.api.validate.RepeatedRulesH\x00R\brepeated\x120\n" +
- "\x03map\x18* \x01(\v2\x1c.kuban.api.validate.MapRulesH\x00R\x03map\x12?\n" +
- "\bduration\x182 \x01(\v2!.kuban.api.validate.DurationRulesH\x00R\bduration\x12B\n" +
- "\ttimestamp\x183 \x01(\v2\".kuban.api.validate.TimestampRulesH\x00R\ttimestampB\x06\n" +
- "\x04type\"=\n" +
- "\x0fPredefinedRules\x12*\n" +
- "\x03cel\x18\x01 \x03(\v2\x18.kuban.api.validate.RuleR\x03cel\"\xf6\x01\n" +
- "\n" +
- "FloatRules\x12\x19\n" +
- "\x05const\x18\x01 \x01(\x02H\x00R\x05const\x88\x01\x01\x12\x13\n" +
- "\x02lt\x18\x02 \x01(\x02H\x01R\x02lt\x88\x01\x01\x12\x15\n" +
- "\x03lte\x18\x03 \x01(\x02H\x02R\x03lte\x88\x01\x01\x12\x13\n" +
- "\x02gt\x18\x04 \x01(\x02H\x03R\x02gt\x88\x01\x01\x12\x15\n" +
- "\x03gte\x18\x05 \x01(\x02H\x04R\x03gte\x88\x01\x01\x12\x0e\n" +
- "\x02in\x18\x06 \x03(\x02R\x02in\x12\x15\n" +
- "\x06not_in\x18\a \x03(\x02R\x05notIn\x12\x1b\n" +
- "\x06finite\x18\b \x01(\bH\x05R\x06finite\x88\x01\x01B\b\n" +
- "\x06_constB\x05\n" +
- "\x03_ltB\x06\n" +
- "\x04_lteB\x05\n" +
- "\x03_gtB\x06\n" +
- "\x04_gteB\t\n" +
- "\a_finite\"\xf7\x01\n" +
- "\vDoubleRules\x12\x19\n" +
- "\x05const\x18\x01 \x01(\x01H\x00R\x05const\x88\x01\x01\x12\x13\n" +
- "\x02lt\x18\x02 \x01(\x01H\x01R\x02lt\x88\x01\x01\x12\x15\n" +
- "\x03lte\x18\x03 \x01(\x01H\x02R\x03lte\x88\x01\x01\x12\x13\n" +
- "\x02gt\x18\x04 \x01(\x01H\x03R\x02gt\x88\x01\x01\x12\x15\n" +
- "\x03gte\x18\x05 \x01(\x01H\x04R\x03gte\x88\x01\x01\x12\x0e\n" +
- "\x02in\x18\x06 \x03(\x01R\x02in\x12\x15\n" +
- "\x06not_in\x18\a \x03(\x01R\x05notIn\x12\x1b\n" +
- "\x06finite\x18\b \x01(\bH\x05R\x06finite\x88\x01\x01B\b\n" +
- "\x06_constB\x05\n" +
- "\x03_ltB\x06\n" +
- "\x04_lteB\x05\n" +
- "\x03_gtB\x06\n" +
- "\x04_gteB\t\n" +
- "\a_finite\"\xce\x01\n" +
- "\n" +
- "Int32Rules\x12\x19\n" +
- "\x05const\x18\x01 \x01(\x05H\x00R\x05const\x88\x01\x01\x12\x13\n" +
- "\x02lt\x18\x02 \x01(\x05H\x01R\x02lt\x88\x01\x01\x12\x15\n" +
- "\x03lte\x18\x03 \x01(\x05H\x02R\x03lte\x88\x01\x01\x12\x13\n" +
- "\x02gt\x18\x04 \x01(\x05H\x03R\x02gt\x88\x01\x01\x12\x15\n" +
- "\x03gte\x18\x05 \x01(\x05H\x04R\x03gte\x88\x01\x01\x12\x0e\n" +
- "\x02in\x18\x06 \x03(\x05R\x02in\x12\x15\n" +
- "\x06not_in\x18\a \x03(\x05R\x05notInB\b\n" +
- "\x06_constB\x05\n" +
- "\x03_ltB\x06\n" +
- "\x04_lteB\x05\n" +
- "\x03_gtB\x06\n" +
- "\x04_gte\"\xce\x01\n" +
- "\n" +
- "Int64Rules\x12\x19\n" +
- "\x05const\x18\x01 \x01(\x03H\x00R\x05const\x88\x01\x01\x12\x13\n" +
- "\x02lt\x18\x02 \x01(\x03H\x01R\x02lt\x88\x01\x01\x12\x15\n" +
- "\x03lte\x18\x03 \x01(\x03H\x02R\x03lte\x88\x01\x01\x12\x13\n" +
- "\x02gt\x18\x04 \x01(\x03H\x03R\x02gt\x88\x01\x01\x12\x15\n" +
- "\x03gte\x18\x05 \x01(\x03H\x04R\x03gte\x88\x01\x01\x12\x0e\n" +
- "\x02in\x18\x06 \x03(\x03R\x02in\x12\x15\n" +
- "\x06not_in\x18\a \x03(\x03R\x05notInB\b\n" +
- "\x06_constB\x05\n" +
- "\x03_ltB\x06\n" +
- "\x04_lteB\x05\n" +
- "\x03_gtB\x06\n" +
- "\x04_gte\"\xcf\x01\n" +
- "\vUInt32Rules\x12\x19\n" +
- "\x05const\x18\x01 \x01(\rH\x00R\x05const\x88\x01\x01\x12\x13\n" +
- "\x02lt\x18\x02 \x01(\rH\x01R\x02lt\x88\x01\x01\x12\x15\n" +
- "\x03lte\x18\x03 \x01(\rH\x02R\x03lte\x88\x01\x01\x12\x13\n" +
- "\x02gt\x18\x04 \x01(\rH\x03R\x02gt\x88\x01\x01\x12\x15\n" +
- "\x03gte\x18\x05 \x01(\rH\x04R\x03gte\x88\x01\x01\x12\x0e\n" +
- "\x02in\x18\x06 \x03(\rR\x02in\x12\x15\n" +
- "\x06not_in\x18\a \x03(\rR\x05notInB\b\n" +
- "\x06_constB\x05\n" +
- "\x03_ltB\x06\n" +
- "\x04_lteB\x05\n" +
- "\x03_gtB\x06\n" +
- "\x04_gte\"\xcf\x01\n" +
- "\vUInt64Rules\x12\x19\n" +
- "\x05const\x18\x01 \x01(\x04H\x00R\x05const\x88\x01\x01\x12\x13\n" +
- "\x02lt\x18\x02 \x01(\x04H\x01R\x02lt\x88\x01\x01\x12\x15\n" +
- "\x03lte\x18\x03 \x01(\x04H\x02R\x03lte\x88\x01\x01\x12\x13\n" +
- "\x02gt\x18\x04 \x01(\x04H\x03R\x02gt\x88\x01\x01\x12\x15\n" +
- "\x03gte\x18\x05 \x01(\x04H\x04R\x03gte\x88\x01\x01\x12\x0e\n" +
- "\x02in\x18\x06 \x03(\x04R\x02in\x12\x15\n" +
- "\x06not_in\x18\a \x03(\x04R\x05notInB\b\n" +
- "\x06_constB\x05\n" +
- "\x03_ltB\x06\n" +
- "\x04_lteB\x05\n" +
- "\x03_gtB\x06\n" +
- "\x04_gte\"\xcf\x01\n" +
- "\vSInt32Rules\x12\x19\n" +
- "\x05const\x18\x01 \x01(\x11H\x00R\x05const\x88\x01\x01\x12\x13\n" +
- "\x02lt\x18\x02 \x01(\x11H\x01R\x02lt\x88\x01\x01\x12\x15\n" +
- "\x03lte\x18\x03 \x01(\x11H\x02R\x03lte\x88\x01\x01\x12\x13\n" +
- "\x02gt\x18\x04 \x01(\x11H\x03R\x02gt\x88\x01\x01\x12\x15\n" +
- "\x03gte\x18\x05 \x01(\x11H\x04R\x03gte\x88\x01\x01\x12\x0e\n" +
- "\x02in\x18\x06 \x03(\x11R\x02in\x12\x15\n" +
- "\x06not_in\x18\a \x03(\x11R\x05notInB\b\n" +
- "\x06_constB\x05\n" +
- "\x03_ltB\x06\n" +
- "\x04_lteB\x05\n" +
- "\x03_gtB\x06\n" +
- "\x04_gte\"\xcf\x01\n" +
- "\vSInt64Rules\x12\x19\n" +
- "\x05const\x18\x01 \x01(\x12H\x00R\x05const\x88\x01\x01\x12\x13\n" +
- "\x02lt\x18\x02 \x01(\x12H\x01R\x02lt\x88\x01\x01\x12\x15\n" +
- "\x03lte\x18\x03 \x01(\x12H\x02R\x03lte\x88\x01\x01\x12\x13\n" +
- "\x02gt\x18\x04 \x01(\x12H\x03R\x02gt\x88\x01\x01\x12\x15\n" +
- "\x03gte\x18\x05 \x01(\x12H\x04R\x03gte\x88\x01\x01\x12\x0e\n" +
- "\x02in\x18\x06 \x03(\x12R\x02in\x12\x15\n" +
- "\x06not_in\x18\a \x03(\x12R\x05notInB\b\n" +
- "\x06_constB\x05\n" +
- "\x03_ltB\x06\n" +
- "\x04_lteB\x05\n" +
- "\x03_gtB\x06\n" +
- "\x04_gte\"\xd0\x01\n" +
- "\fFixed32Rules\x12\x19\n" +
- "\x05const\x18\x01 \x01(\aH\x00R\x05const\x88\x01\x01\x12\x13\n" +
- "\x02lt\x18\x02 \x01(\aH\x01R\x02lt\x88\x01\x01\x12\x15\n" +
- "\x03lte\x18\x03 \x01(\aH\x02R\x03lte\x88\x01\x01\x12\x13\n" +
- "\x02gt\x18\x04 \x01(\aH\x03R\x02gt\x88\x01\x01\x12\x15\n" +
- "\x03gte\x18\x05 \x01(\aH\x04R\x03gte\x88\x01\x01\x12\x0e\n" +
- "\x02in\x18\x06 \x03(\aR\x02in\x12\x15\n" +
- "\x06not_in\x18\a \x03(\aR\x05notInB\b\n" +
- "\x06_constB\x05\n" +
- "\x03_ltB\x06\n" +
- "\x04_lteB\x05\n" +
- "\x03_gtB\x06\n" +
- "\x04_gte\"\xd0\x01\n" +
- "\fFixed64Rules\x12\x19\n" +
- "\x05const\x18\x01 \x01(\x06H\x00R\x05const\x88\x01\x01\x12\x13\n" +
- "\x02lt\x18\x02 \x01(\x06H\x01R\x02lt\x88\x01\x01\x12\x15\n" +
- "\x03lte\x18\x03 \x01(\x06H\x02R\x03lte\x88\x01\x01\x12\x13\n" +
- "\x02gt\x18\x04 \x01(\x06H\x03R\x02gt\x88\x01\x01\x12\x15\n" +
- "\x03gte\x18\x05 \x01(\x06H\x04R\x03gte\x88\x01\x01\x12\x0e\n" +
- "\x02in\x18\x06 \x03(\x06R\x02in\x12\x15\n" +
- "\x06not_in\x18\a \x03(\x06R\x05notInB\b\n" +
- "\x06_constB\x05\n" +
- "\x03_ltB\x06\n" +
- "\x04_lteB\x05\n" +
- "\x03_gtB\x06\n" +
- "\x04_gte\"\xd1\x01\n" +
- "\rSFixed32Rules\x12\x19\n" +
- "\x05const\x18\x01 \x01(\x0fH\x00R\x05const\x88\x01\x01\x12\x13\n" +
- "\x02lt\x18\x02 \x01(\x0fH\x01R\x02lt\x88\x01\x01\x12\x15\n" +
- "\x03lte\x18\x03 \x01(\x0fH\x02R\x03lte\x88\x01\x01\x12\x13\n" +
- "\x02gt\x18\x04 \x01(\x0fH\x03R\x02gt\x88\x01\x01\x12\x15\n" +
- "\x03gte\x18\x05 \x01(\x0fH\x04R\x03gte\x88\x01\x01\x12\x0e\n" +
- "\x02in\x18\x06 \x03(\x0fR\x02in\x12\x15\n" +
- "\x06not_in\x18\a \x03(\x0fR\x05notInB\b\n" +
- "\x06_constB\x05\n" +
- "\x03_ltB\x06\n" +
- "\x04_lteB\x05\n" +
- "\x03_gtB\x06\n" +
- "\x04_gte\"\xd1\x01\n" +
- "\rSFixed64Rules\x12\x19\n" +
- "\x05const\x18\x01 \x01(\x10H\x00R\x05const\x88\x01\x01\x12\x13\n" +
- "\x02lt\x18\x02 \x01(\x10H\x01R\x02lt\x88\x01\x01\x12\x15\n" +
- "\x03lte\x18\x03 \x01(\x10H\x02R\x03lte\x88\x01\x01\x12\x13\n" +
- "\x02gt\x18\x04 \x01(\x10H\x03R\x02gt\x88\x01\x01\x12\x15\n" +
- "\x03gte\x18\x05 \x01(\x10H\x04R\x03gte\x88\x01\x01\x12\x0e\n" +
- "\x02in\x18\x06 \x03(\x10R\x02in\x12\x15\n" +
- "\x06not_in\x18\a \x03(\x10R\x05notInB\b\n" +
- "\x06_constB\x05\n" +
- "\x03_ltB\x06\n" +
- "\x04_lteB\x05\n" +
- "\x03_gtB\x06\n" +
- "\x04_gte\"0\n" +
- "\tBoolRules\x12\x19\n" +
- "\x05const\x18\x01 \x01(\bH\x00R\x05const\x88\x01\x01B\b\n" +
- "\x06_const\"\xec\t\n" +
- "\vStringRules\x12\x19\n" +
- "\x05const\x18\x01 \x01(\tH\x01R\x05const\x88\x01\x01\x12\x15\n" +
- "\x03len\x18\x02 \x01(\x04H\x02R\x03len\x88\x01\x01\x12\x1c\n" +
- "\amin_len\x18\x03 \x01(\x04H\x03R\x06minLen\x88\x01\x01\x12\x1c\n" +
- "\amax_len\x18\x04 \x01(\x04H\x04R\x06maxLen\x88\x01\x01\x12 \n" +
- "\tlen_bytes\x18\x05 \x01(\x04H\x05R\blenBytes\x88\x01\x01\x12 \n" +
- "\tmin_bytes\x18\x06 \x01(\x04H\x06R\bminBytes\x88\x01\x01\x12 \n" +
- "\tmax_bytes\x18\a \x01(\x04H\aR\bmaxBytes\x88\x01\x01\x12\x1d\n" +
- "\apattern\x18\b \x01(\tH\bR\apattern\x88\x01\x01\x12\x1b\n" +
- "\x06prefix\x18\t \x01(\tH\tR\x06prefix\x88\x01\x01\x12\x1b\n" +
- "\x06suffix\x18\n" +
- " \x01(\tH\n" +
- "R\x06suffix\x88\x01\x01\x12\x1f\n" +
- "\bcontains\x18\v \x01(\tH\vR\bcontains\x88\x01\x01\x12&\n" +
- "\fnot_contains\x18\f \x01(\tH\fR\vnotContains\x88\x01\x01\x12\x0e\n" +
- "\x02in\x18\r \x03(\tR\x02in\x12\x15\n" +
- "\x06not_in\x18\x0e \x03(\tR\x05notIn\x12\x16\n" +
- "\x05email\x18\x14 \x01(\bH\x00R\x05email\x12\x1c\n" +
- "\bhostname\x18\x15 \x01(\bH\x00R\bhostname\x12\x10\n" +
- "\x02ip\x18\x16 \x01(\bH\x00R\x02ip\x12\x14\n" +
- "\x04ipv4\x18\x17 \x01(\bH\x00R\x04ipv4\x12\x14\n" +
- "\x04ipv6\x18\x18 \x01(\bH\x00R\x04ipv6\x12\x12\n" +
- "\x03uri\x18\x19 \x01(\bH\x00R\x03uri\x12\x19\n" +
- "\auri_ref\x18\x1a \x01(\bH\x00R\x06uriRef\x12\x14\n" +
- "\x04uuid\x18\x1b \x01(\bH\x00R\x04uuid\x12'\n" +
- "\x0echinese_mobile\x18\x1e \x01(\bH\x00R\rchineseMobile\x12(\n" +
- "\x0fchinese_id_card\x18\x1f \x01(\bH\x00R\rchineseIdCard\x12#\n" +
- "\fchinese_name\x18 \x01(\bH\x00R\vchineseName\x12+\n" +
- "\x10chinese_postcode\x18! \x01(\bH\x00R\x0fchinesePostcode\x12\x19\n" +
- "\x05ascii\x18( \x01(\bH\rR\x05ascii\x88\x01\x01\x12!\n" +
- "\tprintable\x18) \x01(\bH\x0eR\tprintable\x88\x01\x01\x12\x19\n" +
- "\x05alpha\x18* \x01(\bH\x0fR\x05alpha\x88\x01\x01\x12'\n" +
- "\falphanumeric\x18+ \x01(\bH\x10R\falphanumeric\x88\x01\x01\x12\x1d\n" +
- "\anumeric\x18, \x01(\bH\x11R\anumeric\x88\x01\x01\x12!\n" +
- "\tlowercase\x182 \x01(\bH\x12R\tlowercase\x88\x01\x01\x12!\n" +
- "\tuppercase\x183 \x01(\bH\x13R\tuppercase\x88\x01\x01B\f\n" +
- "\n" +
- "well_knownB\b\n" +
- "\x06_constB\x06\n" +
- "\x04_lenB\n" +
- "\n" +
- "\b_min_lenB\n" +
- "\n" +
- "\b_max_lenB\f\n" +
- "\n" +
- "_len_bytesB\f\n" +
- "\n" +
- "_min_bytesB\f\n" +
- "\n" +
- "_max_bytesB\n" +
- "\n" +
- "\b_patternB\t\n" +
- "\a_prefixB\t\n" +
- "\a_suffixB\v\n" +
- "\t_containsB\x0f\n" +
- "\r_not_containsB\b\n" +
- "\x06_asciiB\f\n" +
- "\n" +
- "_printableB\b\n" +
- "\x06_alphaB\x0f\n" +
- "\r_alphanumericB\n" +
- "\n" +
- "\b_numericB\f\n" +
- "\n" +
- "_lowercaseB\f\n" +
- "\n" +
- "_uppercase\"\xc0\x03\n" +
- "\n" +
- "BytesRules\x12\x19\n" +
- "\x05const\x18\x01 \x01(\fH\x01R\x05const\x88\x01\x01\x12\x15\n" +
- "\x03len\x18\x02 \x01(\x04H\x02R\x03len\x88\x01\x01\x12\x1c\n" +
- "\amin_len\x18\x03 \x01(\x04H\x03R\x06minLen\x88\x01\x01\x12\x1c\n" +
- "\amax_len\x18\x04 \x01(\x04H\x04R\x06maxLen\x88\x01\x01\x12\x1d\n" +
- "\apattern\x18\x05 \x01(\fH\x05R\apattern\x88\x01\x01\x12\x1b\n" +
- "\x06prefix\x18\x06 \x01(\fH\x06R\x06prefix\x88\x01\x01\x12\x1b\n" +
- "\x06suffix\x18\a \x01(\fH\aR\x06suffix\x88\x01\x01\x12\x1f\n" +
- "\bcontains\x18\b \x01(\fH\bR\bcontains\x88\x01\x01\x12\x0e\n" +
- "\x02in\x18\t \x03(\fR\x02in\x12\x15\n" +
- "\x06not_in\x18\n" +
- " \x03(\fR\x05notIn\x12\x10\n" +
- "\x02ip\x18\x14 \x01(\bH\x00R\x02ip\x12\x14\n" +
- "\x04ipv4\x18\x15 \x01(\bH\x00R\x04ipv4\x12\x14\n" +
- "\x04ipv6\x18\x16 \x01(\bH\x00R\x04ipv6B\f\n" +
- "\n" +
- "well_knownB\b\n" +
- "\x06_constB\x06\n" +
- "\x04_lenB\n" +
- "\n" +
- "\b_min_lenB\n" +
- "\n" +
- "\b_max_lenB\n" +
- "\n" +
- "\b_patternB\t\n" +
- "\a_prefixB\t\n" +
- "\a_suffixB\v\n" +
- "\t_contains\"\x90\x01\n" +
- "\tEnumRules\x12\x19\n" +
- "\x05const\x18\x01 \x01(\x05H\x00R\x05const\x88\x01\x01\x12&\n" +
- "\fdefined_only\x18\x02 \x01(\bH\x01R\vdefinedOnly\x88\x01\x01\x12\x0e\n" +
- "\x02in\x18\x03 \x03(\x05R\x02in\x12\x15\n" +
- "\x06not_in\x18\x04 \x03(\x05R\x05notInB\b\n" +
- "\x06_constB\x0f\n" +
- "\r_defined_only\"\xcd\x01\n" +
- "\rRepeatedRules\x12 \n" +
- "\tmin_items\x18\x01 \x01(\x04H\x00R\bminItems\x88\x01\x01\x12 \n" +
- "\tmax_items\x18\x02 \x01(\x04H\x01R\bmaxItems\x88\x01\x01\x12\x1b\n" +
- "\x06unique\x18\x03 \x01(\bH\x02R\x06unique\x88\x01\x01\x124\n" +
- "\x05items\x18\x04 \x01(\v2\x1e.kuban.api.validate.FieldRulesR\x05itemsB\f\n" +
- "\n" +
- "_min_itemsB\f\n" +
- "\n" +
- "_max_itemsB\t\n" +
- "\a_unique\"\xd6\x01\n" +
- "\bMapRules\x12 \n" +
- "\tmin_pairs\x18\x01 \x01(\x04H\x00R\bminPairs\x88\x01\x01\x12 \n" +
- "\tmax_pairs\x18\x02 \x01(\x04H\x01R\bmaxPairs\x88\x01\x01\x122\n" +
- "\x04keys\x18\x03 \x01(\v2\x1e.kuban.api.validate.FieldRulesR\x04keys\x126\n" +
- "\x06values\x18\x04 \x01(\v2\x1e.kuban.api.validate.FieldRulesR\x06valuesB\f\n" +
- "\n" +
- "_min_pairsB\f\n" +
- "\n" +
- "_max_pairs\"\xc6\x03\n" +
- "\rDurationRules\x12\x1f\n" +
- "\brequired\x18\x01 \x01(\bH\x00R\brequired\x88\x01\x01\x12(\n" +
- "\rconst_seconds\x18\x02 \x01(\x03H\x01R\fconstSeconds\x88\x01\x01\x12$\n" +
- "\vconst_nanos\x18\x03 \x01(\x05H\x02R\n" +
- "constNanos\x88\x01\x01\x12\"\n" +
- "\n" +
- "lt_seconds\x18\x04 \x01(\x03H\x03R\tltSeconds\x88\x01\x01\x12$\n" +
- "\vlte_seconds\x18\x05 \x01(\x03H\x04R\n" +
- "lteSeconds\x88\x01\x01\x12\"\n" +
- "\n" +
- "gt_seconds\x18\x06 \x01(\x03H\x05R\tgtSeconds\x88\x01\x01\x12$\n" +
- "\vgte_seconds\x18\a \x01(\x03H\x06R\n" +
- "gteSeconds\x88\x01\x01\x12\x1d\n" +
- "\n" +
- "in_seconds\x18\b \x03(\x03R\tinSeconds\x12$\n" +
- "\x0enot_in_seconds\x18\t \x03(\x03R\fnotInSecondsB\v\n" +
- "\t_requiredB\x10\n" +
- "\x0e_const_secondsB\x0e\n" +
- "\f_const_nanosB\r\n" +
- "\v_lt_secondsB\x0e\n" +
- "\f_lte_secondsB\r\n" +
- "\v_gt_secondsB\x0e\n" +
- "\f_gte_seconds\"\xe6\x02\n" +
- "\x0eTimestampRules\x12\x1f\n" +
- "\brequired\x18\x01 \x01(\bH\x00R\brequired\x88\x01\x01\x12\x19\n" +
- "\x05const\x18\x02 \x01(\x03H\x01R\x05const\x88\x01\x01\x12\x13\n" +
- "\x02lt\x18\x03 \x01(\x03H\x02R\x02lt\x88\x01\x01\x12\x15\n" +
- "\x03lte\x18\x04 \x01(\x03H\x03R\x03lte\x88\x01\x01\x12\x13\n" +
- "\x02gt\x18\x05 \x01(\x03H\x04R\x02gt\x88\x01\x01\x12\x15\n" +
- "\x03gte\x18\x06 \x01(\x03H\x05R\x03gte\x88\x01\x01\x12\x1a\n" +
- "\x06lt_now\x18\a \x01(\bH\x06R\x05ltNow\x88\x01\x01\x12\x1a\n" +
- "\x06gt_now\x18\b \x01(\bH\aR\x05gtNow\x88\x01\x01\x12*\n" +
- "\x0ewithin_seconds\x18\t \x01(\x03H\bR\rwithinSeconds\x88\x01\x01B\v\n" +
- "\t_requiredB\b\n" +
- "\x06_constB\x05\n" +
- "\x03_ltB\x06\n" +
- "\x04_lteB\x05\n" +
- "\x03_gtB\x06\n" +
- "\x04_gteB\t\n" +
- "\a_lt_nowB\t\n" +
- "\a_gt_nowB\x11\n" +
- "\x0f_within_seconds*]\n" +
- "\n" +
- "IgnoreRule\x12\x16\n" +
- "\x12IGNORE_UNSPECIFIED\x10\x00\x12\x12\n" +
- "\x0eIGNORE_IF_ZERO\x10\x01\x12\x11\n" +
- "\rIGNORE_ALWAYS\x10\x02\x12\x10\n" +
- "\fIGNORE_NEVER\x10\x03:\\\n" +
- "\amessage\x12\x1f.google.protobuf.MessageOptions\x18\xf4N \x01(\v2 .kuban.api.validate.MessageRulesR\amessage:T\n" +
- "\x05field\x12\x1d.google.protobuf.FieldOptions\x18\xf4N \x01(\v2\x1e.kuban.api.validate.FieldRulesR\x05field:c\n" +
- "\n" +
- "predefined\x12\x1d.google.protobuf.FieldOptions\x18\xf5N \x01(\v2#.kuban.api.validate.PredefinedRulesR\n" +
- "predefined:T\n" +
- "\x05oneof\x12\x1d.google.protobuf.OneofOptions\x18\xf4N \x01(\v2\x1e.kuban.api.validate.OneofRulesR\x05oneofB=Z;git.ikuban.com/server/kubanapis/kuban/api/validate;validateb\x06proto3"
- var (
- file_kuban_api_validate_validate_proto_rawDescOnce sync.Once
- file_kuban_api_validate_validate_proto_rawDescData []byte
- )
- func file_kuban_api_validate_validate_proto_rawDescGZIP() []byte {
- file_kuban_api_validate_validate_proto_rawDescOnce.Do(func() {
- file_kuban_api_validate_validate_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_kuban_api_validate_validate_proto_rawDesc), len(file_kuban_api_validate_validate_proto_rawDesc)))
- })
- return file_kuban_api_validate_validate_proto_rawDescData
- }
- var file_kuban_api_validate_validate_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
- var file_kuban_api_validate_validate_proto_msgTypes = make([]protoimpl.MessageInfo, 25)
- var file_kuban_api_validate_validate_proto_goTypes = []any{
- (IgnoreRule)(0), // 0: kuban.api.validate.IgnoreRule
- (*Rule)(nil), // 1: kuban.api.validate.Rule
- (*MessageRules)(nil), // 2: kuban.api.validate.MessageRules
- (*OneofRules)(nil), // 3: kuban.api.validate.OneofRules
- (*FieldRules)(nil), // 4: kuban.api.validate.FieldRules
- (*PredefinedRules)(nil), // 5: kuban.api.validate.PredefinedRules
- (*FloatRules)(nil), // 6: kuban.api.validate.FloatRules
- (*DoubleRules)(nil), // 7: kuban.api.validate.DoubleRules
- (*Int32Rules)(nil), // 8: kuban.api.validate.Int32Rules
- (*Int64Rules)(nil), // 9: kuban.api.validate.Int64Rules
- (*UInt32Rules)(nil), // 10: kuban.api.validate.UInt32Rules
- (*UInt64Rules)(nil), // 11: kuban.api.validate.UInt64Rules
- (*SInt32Rules)(nil), // 12: kuban.api.validate.SInt32Rules
- (*SInt64Rules)(nil), // 13: kuban.api.validate.SInt64Rules
- (*Fixed32Rules)(nil), // 14: kuban.api.validate.Fixed32Rules
- (*Fixed64Rules)(nil), // 15: kuban.api.validate.Fixed64Rules
- (*SFixed32Rules)(nil), // 16: kuban.api.validate.SFixed32Rules
- (*SFixed64Rules)(nil), // 17: kuban.api.validate.SFixed64Rules
- (*BoolRules)(nil), // 18: kuban.api.validate.BoolRules
- (*StringRules)(nil), // 19: kuban.api.validate.StringRules
- (*BytesRules)(nil), // 20: kuban.api.validate.BytesRules
- (*EnumRules)(nil), // 21: kuban.api.validate.EnumRules
- (*RepeatedRules)(nil), // 22: kuban.api.validate.RepeatedRules
- (*MapRules)(nil), // 23: kuban.api.validate.MapRules
- (*DurationRules)(nil), // 24: kuban.api.validate.DurationRules
- (*TimestampRules)(nil), // 25: kuban.api.validate.TimestampRules
- (*descriptorpb.MessageOptions)(nil), // 26: google.protobuf.MessageOptions
- (*descriptorpb.FieldOptions)(nil), // 27: google.protobuf.FieldOptions
- (*descriptorpb.OneofOptions)(nil), // 28: google.protobuf.OneofOptions
- }
- var file_kuban_api_validate_validate_proto_depIdxs = []int32{
- 1, // 0: kuban.api.validate.MessageRules.cel:type_name -> kuban.api.validate.Rule
- 1, // 1: kuban.api.validate.FieldRules.cel:type_name -> kuban.api.validate.Rule
- 0, // 2: kuban.api.validate.FieldRules.ignore:type_name -> kuban.api.validate.IgnoreRule
- 6, // 3: kuban.api.validate.FieldRules.float:type_name -> kuban.api.validate.FloatRules
- 7, // 4: kuban.api.validate.FieldRules.double:type_name -> kuban.api.validate.DoubleRules
- 8, // 5: kuban.api.validate.FieldRules.int32:type_name -> kuban.api.validate.Int32Rules
- 9, // 6: kuban.api.validate.FieldRules.int64:type_name -> kuban.api.validate.Int64Rules
- 10, // 7: kuban.api.validate.FieldRules.uint32:type_name -> kuban.api.validate.UInt32Rules
- 11, // 8: kuban.api.validate.FieldRules.uint64:type_name -> kuban.api.validate.UInt64Rules
- 12, // 9: kuban.api.validate.FieldRules.sint32:type_name -> kuban.api.validate.SInt32Rules
- 13, // 10: kuban.api.validate.FieldRules.sint64:type_name -> kuban.api.validate.SInt64Rules
- 14, // 11: kuban.api.validate.FieldRules.fixed32:type_name -> kuban.api.validate.Fixed32Rules
- 15, // 12: kuban.api.validate.FieldRules.fixed64:type_name -> kuban.api.validate.Fixed64Rules
- 16, // 13: kuban.api.validate.FieldRules.sfixed32:type_name -> kuban.api.validate.SFixed32Rules
- 17, // 14: kuban.api.validate.FieldRules.sfixed64:type_name -> kuban.api.validate.SFixed64Rules
- 18, // 15: kuban.api.validate.FieldRules.bool:type_name -> kuban.api.validate.BoolRules
- 19, // 16: kuban.api.validate.FieldRules.string:type_name -> kuban.api.validate.StringRules
- 20, // 17: kuban.api.validate.FieldRules.bytes:type_name -> kuban.api.validate.BytesRules
- 21, // 18: kuban.api.validate.FieldRules.enum:type_name -> kuban.api.validate.EnumRules
- 22, // 19: kuban.api.validate.FieldRules.repeated:type_name -> kuban.api.validate.RepeatedRules
- 23, // 20: kuban.api.validate.FieldRules.map:type_name -> kuban.api.validate.MapRules
- 24, // 21: kuban.api.validate.FieldRules.duration:type_name -> kuban.api.validate.DurationRules
- 25, // 22: kuban.api.validate.FieldRules.timestamp:type_name -> kuban.api.validate.TimestampRules
- 1, // 23: kuban.api.validate.PredefinedRules.cel:type_name -> kuban.api.validate.Rule
- 4, // 24: kuban.api.validate.RepeatedRules.items:type_name -> kuban.api.validate.FieldRules
- 4, // 25: kuban.api.validate.MapRules.keys:type_name -> kuban.api.validate.FieldRules
- 4, // 26: kuban.api.validate.MapRules.values:type_name -> kuban.api.validate.FieldRules
- 26, // 27: kuban.api.validate.message:extendee -> google.protobuf.MessageOptions
- 27, // 28: kuban.api.validate.field:extendee -> google.protobuf.FieldOptions
- 27, // 29: kuban.api.validate.predefined:extendee -> google.protobuf.FieldOptions
- 28, // 30: kuban.api.validate.oneof:extendee -> google.protobuf.OneofOptions
- 2, // 31: kuban.api.validate.message:type_name -> kuban.api.validate.MessageRules
- 4, // 32: kuban.api.validate.field:type_name -> kuban.api.validate.FieldRules
- 5, // 33: kuban.api.validate.predefined:type_name -> kuban.api.validate.PredefinedRules
- 3, // 34: kuban.api.validate.oneof:type_name -> kuban.api.validate.OneofRules
- 35, // [35:35] is the sub-list for method output_type
- 35, // [35:35] is the sub-list for method input_type
- 31, // [31:35] is the sub-list for extension type_name
- 27, // [27:31] is the sub-list for extension extendee
- 0, // [0:27] is the sub-list for field type_name
- }
- func init() { file_kuban_api_validate_validate_proto_init() }
- func file_kuban_api_validate_validate_proto_init() {
- if File_kuban_api_validate_validate_proto != nil {
- return
- }
- file_kuban_api_validate_validate_proto_msgTypes[3].OneofWrappers = []any{
- (*FieldRules_Float)(nil),
- (*FieldRules_Double)(nil),
- (*FieldRules_Int32)(nil),
- (*FieldRules_Int64)(nil),
- (*FieldRules_Uint32)(nil),
- (*FieldRules_Uint64)(nil),
- (*FieldRules_Sint32)(nil),
- (*FieldRules_Sint64)(nil),
- (*FieldRules_Fixed32)(nil),
- (*FieldRules_Fixed64)(nil),
- (*FieldRules_Sfixed32)(nil),
- (*FieldRules_Sfixed64)(nil),
- (*FieldRules_Bool)(nil),
- (*FieldRules_String_)(nil),
- (*FieldRules_Bytes)(nil),
- (*FieldRules_Enum)(nil),
- (*FieldRules_Repeated)(nil),
- (*FieldRules_Map)(nil),
- (*FieldRules_Duration)(nil),
- (*FieldRules_Timestamp)(nil),
- }
- file_kuban_api_validate_validate_proto_msgTypes[5].OneofWrappers = []any{}
- file_kuban_api_validate_validate_proto_msgTypes[6].OneofWrappers = []any{}
- file_kuban_api_validate_validate_proto_msgTypes[7].OneofWrappers = []any{}
- file_kuban_api_validate_validate_proto_msgTypes[8].OneofWrappers = []any{}
- file_kuban_api_validate_validate_proto_msgTypes[9].OneofWrappers = []any{}
- file_kuban_api_validate_validate_proto_msgTypes[10].OneofWrappers = []any{}
- file_kuban_api_validate_validate_proto_msgTypes[11].OneofWrappers = []any{}
- file_kuban_api_validate_validate_proto_msgTypes[12].OneofWrappers = []any{}
- file_kuban_api_validate_validate_proto_msgTypes[13].OneofWrappers = []any{}
- file_kuban_api_validate_validate_proto_msgTypes[14].OneofWrappers = []any{}
- file_kuban_api_validate_validate_proto_msgTypes[15].OneofWrappers = []any{}
- file_kuban_api_validate_validate_proto_msgTypes[16].OneofWrappers = []any{}
- file_kuban_api_validate_validate_proto_msgTypes[17].OneofWrappers = []any{}
- file_kuban_api_validate_validate_proto_msgTypes[18].OneofWrappers = []any{
- (*StringRules_Email)(nil),
- (*StringRules_Hostname)(nil),
- (*StringRules_Ip)(nil),
- (*StringRules_Ipv4)(nil),
- (*StringRules_Ipv6)(nil),
- (*StringRules_Uri)(nil),
- (*StringRules_UriRef)(nil),
- (*StringRules_Uuid)(nil),
- (*StringRules_ChineseMobile)(nil),
- (*StringRules_ChineseIdCard)(nil),
- (*StringRules_ChineseName)(nil),
- (*StringRules_ChinesePostcode)(nil),
- }
- file_kuban_api_validate_validate_proto_msgTypes[19].OneofWrappers = []any{
- (*BytesRules_Ip)(nil),
- (*BytesRules_Ipv4)(nil),
- (*BytesRules_Ipv6)(nil),
- }
- file_kuban_api_validate_validate_proto_msgTypes[20].OneofWrappers = []any{}
- file_kuban_api_validate_validate_proto_msgTypes[21].OneofWrappers = []any{}
- file_kuban_api_validate_validate_proto_msgTypes[22].OneofWrappers = []any{}
- file_kuban_api_validate_validate_proto_msgTypes[23].OneofWrappers = []any{}
- file_kuban_api_validate_validate_proto_msgTypes[24].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_validate_proto_rawDesc), len(file_kuban_api_validate_validate_proto_rawDesc)),
- NumEnums: 1,
- NumMessages: 25,
- NumExtensions: 4,
- NumServices: 0,
- },
- GoTypes: file_kuban_api_validate_validate_proto_goTypes,
- DependencyIndexes: file_kuban_api_validate_validate_proto_depIdxs,
- EnumInfos: file_kuban_api_validate_validate_proto_enumTypes,
- MessageInfos: file_kuban_api_validate_validate_proto_msgTypes,
- ExtensionInfos: file_kuban_api_validate_validate_proto_extTypes,
- }.Build()
- File_kuban_api_validate_validate_proto = out.File
- file_kuban_api_validate_validate_proto_goTypes = nil
- file_kuban_api_validate_validate_proto_depIdxs = nil
- }
|