github.com/google/cloudprober@v0.11.3/validators/integrity/proto/config.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // versions: 3 // protoc-gen-go v1.26.0 4 // protoc v3.17.3 5 // source: github.com/google/cloudprober/validators/integrity/proto/config.proto 6 7 package proto 8 9 import ( 10 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 12 reflect "reflect" 13 sync "sync" 14 ) 15 16 const ( 17 // Verify that this generated code is sufficiently up-to-date. 18 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 19 // Verify that runtime/protoimpl is sufficiently up-to-date. 20 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 21 ) 22 23 type Validator struct { 24 state protoimpl.MessageState 25 sizeCache protoimpl.SizeCache 26 unknownFields protoimpl.UnknownFields 27 28 // Validate the data integrity of the response using a pattern that is 29 // repeated throughout the length of the response, with last len(response) % 30 // len(pattern) bytes being zero bytes. 31 // 32 // For example if response length is 100 bytes and pattern length is 8 bytes, 33 // first 96 bytes of the response should be pattern repeated 12 times, and 34 // last 4 bytes should be set to zero byte ('\0') 35 // 36 // Types that are assignable to Pattern: 37 // *Validator_PatternString 38 // *Validator_PatternNumBytes 39 Pattern isValidator_Pattern `protobuf_oneof:"pattern"` 40 } 41 42 func (x *Validator) Reset() { 43 *x = Validator{} 44 if protoimpl.UnsafeEnabled { 45 mi := &file_github_com_google_cloudprober_validators_integrity_proto_config_proto_msgTypes[0] 46 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 47 ms.StoreMessageInfo(mi) 48 } 49 } 50 51 func (x *Validator) String() string { 52 return protoimpl.X.MessageStringOf(x) 53 } 54 55 func (*Validator) ProtoMessage() {} 56 57 func (x *Validator) ProtoReflect() protoreflect.Message { 58 mi := &file_github_com_google_cloudprober_validators_integrity_proto_config_proto_msgTypes[0] 59 if protoimpl.UnsafeEnabled && x != nil { 60 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 61 if ms.LoadMessageInfo() == nil { 62 ms.StoreMessageInfo(mi) 63 } 64 return ms 65 } 66 return mi.MessageOf(x) 67 } 68 69 // Deprecated: Use Validator.ProtoReflect.Descriptor instead. 70 func (*Validator) Descriptor() ([]byte, []int) { 71 return file_github_com_google_cloudprober_validators_integrity_proto_config_proto_rawDescGZIP(), []int{0} 72 } 73 74 func (m *Validator) GetPattern() isValidator_Pattern { 75 if m != nil { 76 return m.Pattern 77 } 78 return nil 79 } 80 81 func (x *Validator) GetPatternString() string { 82 if x, ok := x.GetPattern().(*Validator_PatternString); ok { 83 return x.PatternString 84 } 85 return "" 86 } 87 88 func (x *Validator) GetPatternNumBytes() int32 { 89 if x, ok := x.GetPattern().(*Validator_PatternNumBytes); ok { 90 return x.PatternNumBytes 91 } 92 return 0 93 } 94 95 type isValidator_Pattern interface { 96 isValidator_Pattern() 97 } 98 99 type Validator_PatternString struct { 100 // Pattern string for pattern repetition based integrity checks. 101 // For example, cloudprobercloudprobercloudprober... 102 PatternString string `protobuf:"bytes,1,opt,name=pattern_string,json=patternString,oneof"` 103 } 104 105 type Validator_PatternNumBytes struct { 106 // Pattern is derived from the first few bytes of the payload. This is 107 // useful when pattern is not known in advance, for example cloudprober's 108 // ping probe repeates the timestamp (8 bytes) in the packet payload. 109 // An error is returned if response is smaller than pattern_num_bytes. 110 PatternNumBytes int32 `protobuf:"varint,2,opt,name=pattern_num_bytes,json=patternNumBytes,oneof"` 111 } 112 113 func (*Validator_PatternString) isValidator_Pattern() {} 114 115 func (*Validator_PatternNumBytes) isValidator_Pattern() {} 116 117 var File_github_com_google_cloudprober_validators_integrity_proto_config_proto protoreflect.FileDescriptor 118 119 var file_github_com_google_cloudprober_validators_integrity_proto_config_proto_rawDesc = []byte{ 120 0x0a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 121 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x72, 0x2f, 122 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x67, 123 0x72, 0x69, 0x74, 0x79, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 124 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72, 125 0x6f, 0x62, 0x65, 0x72, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2e, 126 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x69, 0x74, 0x79, 0x22, 0x6d, 0x0a, 0x09, 0x56, 0x61, 0x6c, 127 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x27, 0x0a, 0x0e, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 128 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 129 0x52, 0x0d, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 130 0x2c, 0x0a, 0x11, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x5f, 0x62, 131 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x61, 132 0x74, 0x74, 0x65, 0x72, 0x6e, 0x4e, 0x75, 0x6d, 0x42, 0x79, 0x74, 0x65, 0x73, 0x42, 0x09, 0x0a, 133 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 134 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 135 0x6f, 0x75, 0x64, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x72, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 136 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x69, 0x74, 0x79, 0x2f, 0x70, 137 0x72, 0x6f, 0x74, 0x6f, 138 } 139 140 var ( 141 file_github_com_google_cloudprober_validators_integrity_proto_config_proto_rawDescOnce sync.Once 142 file_github_com_google_cloudprober_validators_integrity_proto_config_proto_rawDescData = file_github_com_google_cloudprober_validators_integrity_proto_config_proto_rawDesc 143 ) 144 145 func file_github_com_google_cloudprober_validators_integrity_proto_config_proto_rawDescGZIP() []byte { 146 file_github_com_google_cloudprober_validators_integrity_proto_config_proto_rawDescOnce.Do(func() { 147 file_github_com_google_cloudprober_validators_integrity_proto_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_google_cloudprober_validators_integrity_proto_config_proto_rawDescData) 148 }) 149 return file_github_com_google_cloudprober_validators_integrity_proto_config_proto_rawDescData 150 } 151 152 var file_github_com_google_cloudprober_validators_integrity_proto_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) 153 var file_github_com_google_cloudprober_validators_integrity_proto_config_proto_goTypes = []interface{}{ 154 (*Validator)(nil), // 0: cloudprober.validators.integrity.Validator 155 } 156 var file_github_com_google_cloudprober_validators_integrity_proto_config_proto_depIdxs = []int32{ 157 0, // [0:0] is the sub-list for method output_type 158 0, // [0:0] is the sub-list for method input_type 159 0, // [0:0] is the sub-list for extension type_name 160 0, // [0:0] is the sub-list for extension extendee 161 0, // [0:0] is the sub-list for field type_name 162 } 163 164 func init() { file_github_com_google_cloudprober_validators_integrity_proto_config_proto_init() } 165 func file_github_com_google_cloudprober_validators_integrity_proto_config_proto_init() { 166 if File_github_com_google_cloudprober_validators_integrity_proto_config_proto != nil { 167 return 168 } 169 if !protoimpl.UnsafeEnabled { 170 file_github_com_google_cloudprober_validators_integrity_proto_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 171 switch v := v.(*Validator); i { 172 case 0: 173 return &v.state 174 case 1: 175 return &v.sizeCache 176 case 2: 177 return &v.unknownFields 178 default: 179 return nil 180 } 181 } 182 } 183 file_github_com_google_cloudprober_validators_integrity_proto_config_proto_msgTypes[0].OneofWrappers = []interface{}{ 184 (*Validator_PatternString)(nil), 185 (*Validator_PatternNumBytes)(nil), 186 } 187 type x struct{} 188 out := protoimpl.TypeBuilder{ 189 File: protoimpl.DescBuilder{ 190 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 191 RawDescriptor: file_github_com_google_cloudprober_validators_integrity_proto_config_proto_rawDesc, 192 NumEnums: 0, 193 NumMessages: 1, 194 NumExtensions: 0, 195 NumServices: 0, 196 }, 197 GoTypes: file_github_com_google_cloudprober_validators_integrity_proto_config_proto_goTypes, 198 DependencyIndexes: file_github_com_google_cloudprober_validators_integrity_proto_config_proto_depIdxs, 199 MessageInfos: file_github_com_google_cloudprober_validators_integrity_proto_config_proto_msgTypes, 200 }.Build() 201 File_github_com_google_cloudprober_validators_integrity_proto_config_proto = out.File 202 file_github_com_google_cloudprober_validators_integrity_proto_config_proto_rawDesc = nil 203 file_github_com_google_cloudprober_validators_integrity_proto_config_proto_goTypes = nil 204 file_github_com_google_cloudprober_validators_integrity_proto_config_proto_depIdxs = nil 205 }