github.com/hashicorp/vault/sdk@v0.13.0/logical/event.pb.go (about) 1 // Copyright (c) HashiCorp, Inc. 2 // SPDX-License-Identifier: MPL-2.0 3 4 // Code generated by protoc-gen-go. DO NOT EDIT. 5 // versions: 6 // protoc-gen-go v1.34.1 7 // protoc (unknown) 8 // source: sdk/logical/event.proto 9 10 package logical 11 12 import ( 13 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 14 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 15 structpb "google.golang.org/protobuf/types/known/structpb" 16 reflect "reflect" 17 sync "sync" 18 ) 19 20 const ( 21 // Verify that this generated code is sufficiently up-to-date. 22 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 23 // Verify that runtime/protoimpl is sufficiently up-to-date. 24 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 25 ) 26 27 // EventPluginInfo contains data related to the plugin that generated an event. 28 type EventPluginInfo struct { 29 state protoimpl.MessageState 30 sizeCache protoimpl.SizeCache 31 unknownFields protoimpl.UnknownFields 32 33 // The type of plugin this event originated from, i.e., "auth" or "secrets. 34 MountClass string `protobuf:"bytes,1,opt,name=mount_class,json=mountClass,proto3" json:"mount_class,omitempty"` 35 // Unique ID of the mount entry, e.g., "kv_957bb7d8" 36 MountAccessor string `protobuf:"bytes,2,opt,name=mount_accessor,json=mountAccessor,proto3" json:"mount_accessor,omitempty"` 37 // Mount path of the plugin this event originated from, e.g., "secret/" 38 MountPath string `protobuf:"bytes,3,opt,name=mount_path,json=mountPath,proto3" json:"mount_path,omitempty"` 39 // Plugin name that this event originated from, e.g., "kv" 40 Plugin string `protobuf:"bytes,4,opt,name=plugin,proto3" json:"plugin,omitempty"` 41 // Plugin version of the plugin this event originated from, e.g., "v0.13.3+builtin" 42 PluginVersion string `protobuf:"bytes,5,opt,name=plugin_version,json=pluginVersion,proto3" json:"plugin_version,omitempty"` 43 // Mount version that this event originated from, i.e., if KVv2, then "2". Usually empty. 44 Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"` 45 } 46 47 func (x *EventPluginInfo) Reset() { 48 *x = EventPluginInfo{} 49 if protoimpl.UnsafeEnabled { 50 mi := &file_sdk_logical_event_proto_msgTypes[0] 51 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 52 ms.StoreMessageInfo(mi) 53 } 54 } 55 56 func (x *EventPluginInfo) String() string { 57 return protoimpl.X.MessageStringOf(x) 58 } 59 60 func (*EventPluginInfo) ProtoMessage() {} 61 62 func (x *EventPluginInfo) ProtoReflect() protoreflect.Message { 63 mi := &file_sdk_logical_event_proto_msgTypes[0] 64 if protoimpl.UnsafeEnabled && x != nil { 65 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 66 if ms.LoadMessageInfo() == nil { 67 ms.StoreMessageInfo(mi) 68 } 69 return ms 70 } 71 return mi.MessageOf(x) 72 } 73 74 // Deprecated: Use EventPluginInfo.ProtoReflect.Descriptor instead. 75 func (*EventPluginInfo) Descriptor() ([]byte, []int) { 76 return file_sdk_logical_event_proto_rawDescGZIP(), []int{0} 77 } 78 79 func (x *EventPluginInfo) GetMountClass() string { 80 if x != nil { 81 return x.MountClass 82 } 83 return "" 84 } 85 86 func (x *EventPluginInfo) GetMountAccessor() string { 87 if x != nil { 88 return x.MountAccessor 89 } 90 return "" 91 } 92 93 func (x *EventPluginInfo) GetMountPath() string { 94 if x != nil { 95 return x.MountPath 96 } 97 return "" 98 } 99 100 func (x *EventPluginInfo) GetPlugin() string { 101 if x != nil { 102 return x.Plugin 103 } 104 return "" 105 } 106 107 func (x *EventPluginInfo) GetPluginVersion() string { 108 if x != nil { 109 return x.PluginVersion 110 } 111 return "" 112 } 113 114 func (x *EventPluginInfo) GetVersion() string { 115 if x != nil { 116 return x.Version 117 } 118 return "" 119 } 120 121 // EventData contains event data in a CloudEvents container. 122 type EventData struct { 123 state protoimpl.MessageState 124 sizeCache protoimpl.SizeCache 125 unknownFields protoimpl.UnknownFields 126 127 // ID identifies the event. It is required. The combination of 128 // CloudEvents Source (i.e., Vault cluster) + ID must be unique. 129 // Events with the same Source + ID can be assumed to be duplicates 130 // by consumers. 131 // Be careful when setting this manually that the ID contains enough 132 // entropy to be unique, or possibly that it is idempotent, such 133 // as a hash of other fields with sufficient uniqueness. 134 Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 135 // Arbitrary non-secret data. Optional. 136 Metadata *structpb.Struct `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` 137 // Any IDs that the event relates to, i.e., UUIDs, paths. 138 EntityIds []string `protobuf:"bytes,3,rep,name=entity_ids,json=entityIds,proto3" json:"entity_ids,omitempty"` 139 // Human-readable note. 140 Note string `protobuf:"bytes,4,opt,name=note,proto3" json:"note,omitempty"` 141 } 142 143 func (x *EventData) Reset() { 144 *x = EventData{} 145 if protoimpl.UnsafeEnabled { 146 mi := &file_sdk_logical_event_proto_msgTypes[1] 147 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 148 ms.StoreMessageInfo(mi) 149 } 150 } 151 152 func (x *EventData) String() string { 153 return protoimpl.X.MessageStringOf(x) 154 } 155 156 func (*EventData) ProtoMessage() {} 157 158 func (x *EventData) ProtoReflect() protoreflect.Message { 159 mi := &file_sdk_logical_event_proto_msgTypes[1] 160 if protoimpl.UnsafeEnabled && x != nil { 161 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 162 if ms.LoadMessageInfo() == nil { 163 ms.StoreMessageInfo(mi) 164 } 165 return ms 166 } 167 return mi.MessageOf(x) 168 } 169 170 // Deprecated: Use EventData.ProtoReflect.Descriptor instead. 171 func (*EventData) Descriptor() ([]byte, []int) { 172 return file_sdk_logical_event_proto_rawDescGZIP(), []int{1} 173 } 174 175 func (x *EventData) GetId() string { 176 if x != nil { 177 return x.Id 178 } 179 return "" 180 } 181 182 func (x *EventData) GetMetadata() *structpb.Struct { 183 if x != nil { 184 return x.Metadata 185 } 186 return nil 187 } 188 189 func (x *EventData) GetEntityIds() []string { 190 if x != nil { 191 return x.EntityIds 192 } 193 return nil 194 } 195 196 func (x *EventData) GetNote() string { 197 if x != nil { 198 return x.Note 199 } 200 return "" 201 } 202 203 // EventReceived is used to consume events and includes additional metadata regarding 204 // the event type and plugin information. 205 type EventReceived struct { 206 state protoimpl.MessageState 207 sizeCache protoimpl.SizeCache 208 unknownFields protoimpl.UnknownFields 209 210 Event *EventData `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` 211 // namespace path 212 Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` 213 EventType string `protobuf:"bytes,3,opt,name=event_type,json=eventType,proto3" json:"event_type,omitempty"` 214 PluginInfo *EventPluginInfo `protobuf:"bytes,4,opt,name=plugin_info,json=pluginInfo,proto3" json:"plugin_info,omitempty"` 215 } 216 217 func (x *EventReceived) Reset() { 218 *x = EventReceived{} 219 if protoimpl.UnsafeEnabled { 220 mi := &file_sdk_logical_event_proto_msgTypes[2] 221 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 222 ms.StoreMessageInfo(mi) 223 } 224 } 225 226 func (x *EventReceived) String() string { 227 return protoimpl.X.MessageStringOf(x) 228 } 229 230 func (*EventReceived) ProtoMessage() {} 231 232 func (x *EventReceived) ProtoReflect() protoreflect.Message { 233 mi := &file_sdk_logical_event_proto_msgTypes[2] 234 if protoimpl.UnsafeEnabled && x != nil { 235 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 236 if ms.LoadMessageInfo() == nil { 237 ms.StoreMessageInfo(mi) 238 } 239 return ms 240 } 241 return mi.MessageOf(x) 242 } 243 244 // Deprecated: Use EventReceived.ProtoReflect.Descriptor instead. 245 func (*EventReceived) Descriptor() ([]byte, []int) { 246 return file_sdk_logical_event_proto_rawDescGZIP(), []int{2} 247 } 248 249 func (x *EventReceived) GetEvent() *EventData { 250 if x != nil { 251 return x.Event 252 } 253 return nil 254 } 255 256 func (x *EventReceived) GetNamespace() string { 257 if x != nil { 258 return x.Namespace 259 } 260 return "" 261 } 262 263 func (x *EventReceived) GetEventType() string { 264 if x != nil { 265 return x.EventType 266 } 267 return "" 268 } 269 270 func (x *EventReceived) GetPluginInfo() *EventPluginInfo { 271 if x != nil { 272 return x.PluginInfo 273 } 274 return nil 275 } 276 277 var File_sdk_logical_event_proto protoreflect.FileDescriptor 278 279 var file_sdk_logical_event_proto_rawDesc = []byte{ 280 0x0a, 0x17, 0x73, 0x64, 0x6b, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x2f, 0x65, 0x76, 281 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x6c, 0x6f, 0x67, 0x69, 0x63, 282 0x61, 0x6c, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 283 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 284 0x22, 0xd1, 0x01, 0x0a, 0x0f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 285 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x63, 0x6c, 286 0x61, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 287 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 288 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 289 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 290 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 291 0x52, 0x09, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x70, 292 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x75, 293 0x67, 0x69, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x76, 0x65, 294 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x6c, 0x75, 295 0x67, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 296 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 297 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x83, 0x01, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x44, 0x61, 298 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 299 0x69, 0x64, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 300 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 301 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x08, 0x6d, 302 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x6e, 0x74, 0x69, 0x74, 303 0x79, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6e, 0x74, 304 0x69, 0x74, 0x79, 0x49, 0x64, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x6f, 0x74, 0x65, 0x18, 0x04, 305 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x6f, 0x74, 0x65, 0x22, 0xb1, 0x01, 0x0a, 0x0d, 0x45, 306 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x12, 0x28, 0x0a, 0x05, 307 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6c, 0x6f, 308 0x67, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 309 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 310 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 311 0x70, 0x61, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 312 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 313 0x79, 0x70, 0x65, 0x12, 0x39, 0x0a, 0x0b, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 314 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x63, 315 0x61, 0x6c, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, 316 0x66, 0x6f, 0x52, 0x0a, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x28, 317 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 318 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x73, 0x64, 0x6b, 319 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 320 } 321 322 var ( 323 file_sdk_logical_event_proto_rawDescOnce sync.Once 324 file_sdk_logical_event_proto_rawDescData = file_sdk_logical_event_proto_rawDesc 325 ) 326 327 func file_sdk_logical_event_proto_rawDescGZIP() []byte { 328 file_sdk_logical_event_proto_rawDescOnce.Do(func() { 329 file_sdk_logical_event_proto_rawDescData = protoimpl.X.CompressGZIP(file_sdk_logical_event_proto_rawDescData) 330 }) 331 return file_sdk_logical_event_proto_rawDescData 332 } 333 334 var file_sdk_logical_event_proto_msgTypes = make([]protoimpl.MessageInfo, 3) 335 var file_sdk_logical_event_proto_goTypes = []interface{}{ 336 (*EventPluginInfo)(nil), // 0: logical.EventPluginInfo 337 (*EventData)(nil), // 1: logical.EventData 338 (*EventReceived)(nil), // 2: logical.EventReceived 339 (*structpb.Struct)(nil), // 3: google.protobuf.Struct 340 } 341 var file_sdk_logical_event_proto_depIdxs = []int32{ 342 3, // 0: logical.EventData.metadata:type_name -> google.protobuf.Struct 343 1, // 1: logical.EventReceived.event:type_name -> logical.EventData 344 0, // 2: logical.EventReceived.plugin_info:type_name -> logical.EventPluginInfo 345 3, // [3:3] is the sub-list for method output_type 346 3, // [3:3] is the sub-list for method input_type 347 3, // [3:3] is the sub-list for extension type_name 348 3, // [3:3] is the sub-list for extension extendee 349 0, // [0:3] is the sub-list for field type_name 350 } 351 352 func init() { file_sdk_logical_event_proto_init() } 353 func file_sdk_logical_event_proto_init() { 354 if File_sdk_logical_event_proto != nil { 355 return 356 } 357 if !protoimpl.UnsafeEnabled { 358 file_sdk_logical_event_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 359 switch v := v.(*EventPluginInfo); i { 360 case 0: 361 return &v.state 362 case 1: 363 return &v.sizeCache 364 case 2: 365 return &v.unknownFields 366 default: 367 return nil 368 } 369 } 370 file_sdk_logical_event_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 371 switch v := v.(*EventData); i { 372 case 0: 373 return &v.state 374 case 1: 375 return &v.sizeCache 376 case 2: 377 return &v.unknownFields 378 default: 379 return nil 380 } 381 } 382 file_sdk_logical_event_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 383 switch v := v.(*EventReceived); i { 384 case 0: 385 return &v.state 386 case 1: 387 return &v.sizeCache 388 case 2: 389 return &v.unknownFields 390 default: 391 return nil 392 } 393 } 394 } 395 type x struct{} 396 out := protoimpl.TypeBuilder{ 397 File: protoimpl.DescBuilder{ 398 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 399 RawDescriptor: file_sdk_logical_event_proto_rawDesc, 400 NumEnums: 0, 401 NumMessages: 3, 402 NumExtensions: 0, 403 NumServices: 0, 404 }, 405 GoTypes: file_sdk_logical_event_proto_goTypes, 406 DependencyIndexes: file_sdk_logical_event_proto_depIdxs, 407 MessageInfos: file_sdk_logical_event_proto_msgTypes, 408 }.Build() 409 File_sdk_logical_event_proto = out.File 410 file_sdk_logical_event_proto_rawDesc = nil 411 file_sdk_logical_event_proto_goTypes = nil 412 file_sdk_logical_event_proto_depIdxs = nil 413 }