github.com/cloudwan/edgelq-sdk@v1.15.4/audit/resources/v1/common/common.pb.validate.go (about) 1 // Code generated by protoc-gen-goten-validate 2 // File: edgelq/audit/proto/v1/common.proto 3 // DO NOT EDIT!!! 4 5 package common 6 7 import ( 8 "bytes" 9 "errors" 10 "fmt" 11 "net" 12 "net/url" 13 "regexp" 14 "strings" 15 "time" 16 "unicode/utf8" 17 18 gotenvalidate "github.com/cloudwan/goten-sdk/runtime/validate" 19 ) 20 21 // proto imports 22 import ( 23 anypb "google.golang.org/protobuf/types/known/anypb" 24 timestamppb "google.golang.org/protobuf/types/known/timestamppb" 25 ) 26 27 var ( 28 _ = bytes.Equal 29 _ = errors.New 30 _ = fmt.Errorf 31 _ = net.ParseIP 32 _ = regexp.Match 33 _ = strings.Split 34 _ = time.Now 35 _ = utf8.RuneCountInString 36 _ = url.Parse 37 _ = gotenvalidate.NewValidationError 38 39 validation_regex_LabelDescriptor_key_c12b6926c4eb549aa691c1ddf8b26524 = regexp.MustCompile("^[_A-Za-z][_A-Za-z0-9]{0,63}$") 40 ) 41 42 // make sure we're using proto imports 43 var ( 44 _ = &anypb.Any{} 45 _ = ×tamppb.Timestamp{} 46 ) 47 48 func (obj *Authentication) GotenValidate() error { 49 if obj == nil { 50 return nil 51 } 52 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 53 return cvobj.GotenCustomValidate() 54 } 55 return nil 56 } 57 func (obj *Authorization) GotenValidate() error { 58 if obj == nil { 59 return nil 60 } 61 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 62 return cvobj.GotenCustomValidate() 63 } 64 return nil 65 } 66 func (obj *ServiceData) GotenValidate() error { 67 if obj == nil { 68 return nil 69 } 70 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 71 return cvobj.GotenCustomValidate() 72 } 73 return nil 74 } 75 func (obj *ObjectState) GotenValidate() error { 76 if obj == nil { 77 return nil 78 } 79 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 80 return cvobj.GotenCustomValidate() 81 } 82 return nil 83 } 84 func (obj *LabelDescriptor) GotenValidate() error { 85 if obj == nil { 86 return nil 87 } 88 if !validation_regex_LabelDescriptor_key_c12b6926c4eb549aa691c1ddf8b26524.Match([]byte(obj.Key)) { 89 return gotenvalidate.NewValidationError("LabelDescriptor", "key", obj.Key, "field must match the regex ^[_A-Za-z][_A-Za-z0-9]{0,63}$", nil) 90 } 91 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 92 return cvobj.GotenCustomValidate() 93 } 94 return nil 95 } 96 func (obj *LabelKeySet) GotenValidate() error { 97 if obj == nil { 98 return nil 99 } 100 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 101 return cvobj.GotenCustomValidate() 102 } 103 return nil 104 } 105 func (obj *TimeInterval) GotenValidate() error { 106 if obj == nil { 107 return nil 108 } 109 if obj.StartTime == nil { 110 return gotenvalidate.NewValidationError("TimeInterval", "startTime", obj.StartTime, "field is required", nil) 111 } 112 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 113 return cvobj.GotenCustomValidate() 114 } 115 return nil 116 }