1// Copyright 2018 The Grafeas Authors. All rights reserved. 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15// Code generated by protoc-gen-go. DO NOT EDIT. 16// versions: 17// protoc-gen-go v1.25.0 18// protoc v3.13.0 19// source: google/devtools/containeranalysis/v1beta1/common/common.proto 20 21package common 22 23import ( 24 reflect "reflect" 25 sync "sync" 26 27 proto "github.com/golang/protobuf/proto" 28 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 29 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 30) 31 32const ( 33 // Verify that this generated code is sufficiently up-to-date. 34 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 35 // Verify that runtime/protoimpl is sufficiently up-to-date. 36 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 37) 38 39// This is a compile-time assertion that a sufficiently up-to-date version 40// of the legacy proto package is being used. 41const _ = proto.ProtoPackageIsVersion4 42 43// Kind represents the kinds of notes supported. 44type NoteKind int32 45 46const ( 47 // Unknown. 48 NoteKind_NOTE_KIND_UNSPECIFIED NoteKind = 0 49 // The note and occurrence represent a package vulnerability. 50 NoteKind_VULNERABILITY NoteKind = 1 51 // The note and occurrence assert build provenance. 52 NoteKind_BUILD NoteKind = 2 53 // This represents an image basis relationship. 54 NoteKind_IMAGE NoteKind = 3 55 // This represents a package installed via a package manager. 56 NoteKind_PACKAGE NoteKind = 4 57 // The note and occurrence track deployment events. 58 NoteKind_DEPLOYMENT NoteKind = 5 59 // The note and occurrence track the initial discovery status of a resource. 60 NoteKind_DISCOVERY NoteKind = 6 61 // This represents a logical "role" that can attest to artifacts. 62 NoteKind_ATTESTATION NoteKind = 7 63) 64 65// Enum value maps for NoteKind. 66var ( 67 NoteKind_name = map[int32]string{ 68 0: "NOTE_KIND_UNSPECIFIED", 69 1: "VULNERABILITY", 70 2: "BUILD", 71 3: "IMAGE", 72 4: "PACKAGE", 73 5: "DEPLOYMENT", 74 6: "DISCOVERY", 75 7: "ATTESTATION", 76 } 77 NoteKind_value = map[string]int32{ 78 "NOTE_KIND_UNSPECIFIED": 0, 79 "VULNERABILITY": 1, 80 "BUILD": 2, 81 "IMAGE": 3, 82 "PACKAGE": 4, 83 "DEPLOYMENT": 5, 84 "DISCOVERY": 6, 85 "ATTESTATION": 7, 86 } 87) 88 89func (x NoteKind) Enum() *NoteKind { 90 p := new(NoteKind) 91 *p = x 92 return p 93} 94 95func (x NoteKind) String() string { 96 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 97} 98 99func (NoteKind) Descriptor() protoreflect.EnumDescriptor { 100 return file_google_devtools_containeranalysis_v1beta1_common_common_proto_enumTypes[0].Descriptor() 101} 102 103func (NoteKind) Type() protoreflect.EnumType { 104 return &file_google_devtools_containeranalysis_v1beta1_common_common_proto_enumTypes[0] 105} 106 107func (x NoteKind) Number() protoreflect.EnumNumber { 108 return protoreflect.EnumNumber(x) 109} 110 111// Deprecated: Use NoteKind.Descriptor instead. 112func (NoteKind) EnumDescriptor() ([]byte, []int) { 113 return file_google_devtools_containeranalysis_v1beta1_common_common_proto_rawDescGZIP(), []int{0} 114} 115 116// Metadata for any related URL information. 117type RelatedUrl struct { 118 state protoimpl.MessageState 119 sizeCache protoimpl.SizeCache 120 unknownFields protoimpl.UnknownFields 121 122 // Specific URL associated with the resource. 123 Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` 124 // Label to describe usage of the URL. 125 Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` 126} 127 128func (x *RelatedUrl) Reset() { 129 *x = RelatedUrl{} 130 if protoimpl.UnsafeEnabled { 131 mi := &file_google_devtools_containeranalysis_v1beta1_common_common_proto_msgTypes[0] 132 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 133 ms.StoreMessageInfo(mi) 134 } 135} 136 137func (x *RelatedUrl) String() string { 138 return protoimpl.X.MessageStringOf(x) 139} 140 141func (*RelatedUrl) ProtoMessage() {} 142 143func (x *RelatedUrl) ProtoReflect() protoreflect.Message { 144 mi := &file_google_devtools_containeranalysis_v1beta1_common_common_proto_msgTypes[0] 145 if protoimpl.UnsafeEnabled && x != nil { 146 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 147 if ms.LoadMessageInfo() == nil { 148 ms.StoreMessageInfo(mi) 149 } 150 return ms 151 } 152 return mi.MessageOf(x) 153} 154 155// Deprecated: Use RelatedUrl.ProtoReflect.Descriptor instead. 156func (*RelatedUrl) Descriptor() ([]byte, []int) { 157 return file_google_devtools_containeranalysis_v1beta1_common_common_proto_rawDescGZIP(), []int{0} 158} 159 160func (x *RelatedUrl) GetUrl() string { 161 if x != nil { 162 return x.Url 163 } 164 return "" 165} 166 167func (x *RelatedUrl) GetLabel() string { 168 if x != nil { 169 return x.Label 170 } 171 return "" 172} 173 174// Verifiers (e.g. Kritis implementations) MUST verify signatures 175// with respect to the trust anchors defined in policy (e.g. a Kritis policy). 176// Typically this means that the verifier has been configured with a map from 177// `public_key_id` to public key material (and any required parameters, e.g. 178// signing algorithm). 179// 180// In particular, verification implementations MUST NOT treat the signature 181// `public_key_id` as anything more than a key lookup hint. The `public_key_id` 182// DOES NOT validate or authenticate a public key; it only provides a mechanism 183// for quickly selecting a public key ALREADY CONFIGURED on the verifier through 184// a trusted channel. Verification implementations MUST reject signatures in any 185// of the following circumstances: 186// * The `public_key_id` is not recognized by the verifier. 187// * The public key that `public_key_id` refers to does not verify the 188// signature with respect to the payload. 189// 190// The `signature` contents SHOULD NOT be "attached" (where the payload is 191// included with the serialized `signature` bytes). Verifiers MUST ignore any 192// "attached" payload and only verify signatures with respect to explicitly 193// provided payload (e.g. a `payload` field on the proto message that holds 194// this Signature, or the canonical serialization of the proto message that 195// holds this signature). 196type Signature struct { 197 state protoimpl.MessageState 198 sizeCache protoimpl.SizeCache 199 unknownFields protoimpl.UnknownFields 200 201 // The content of the signature, an opaque bytestring. 202 // The payload that this signature verifies MUST be unambiguously provided 203 // with the Signature during verification. A wrapper message might provide 204 // the payload explicitly. Alternatively, a message might have a canonical 205 // serialization that can always be unambiguously computed to derive the 206 // payload. 207 Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` 208 // The identifier for the public key that verifies this signature. 209 // * The `public_key_id` is required. 210 // * The `public_key_id` MUST be an RFC3986 conformant URI. 211 // * When possible, the `public_key_id` SHOULD be an immutable reference, 212 // such as a cryptographic digest. 213 // 214 // Examples of valid `public_key_id`s: 215 // 216 // OpenPGP V4 public key fingerprint: 217 // * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA" 218 // See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more 219 // details on this scheme. 220 // 221 // RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER 222 // serialization): 223 // * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU" 224 // * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5" 225 PublicKeyId string `protobuf:"bytes,2,opt,name=public_key_id,json=publicKeyId,proto3" json:"public_key_id,omitempty"` 226} 227 228func (x *Signature) Reset() { 229 *x = Signature{} 230 if protoimpl.UnsafeEnabled { 231 mi := &file_google_devtools_containeranalysis_v1beta1_common_common_proto_msgTypes[1] 232 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 233 ms.StoreMessageInfo(mi) 234 } 235} 236 237func (x *Signature) String() string { 238 return protoimpl.X.MessageStringOf(x) 239} 240 241func (*Signature) ProtoMessage() {} 242 243func (x *Signature) ProtoReflect() protoreflect.Message { 244 mi := &file_google_devtools_containeranalysis_v1beta1_common_common_proto_msgTypes[1] 245 if protoimpl.UnsafeEnabled && x != nil { 246 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 247 if ms.LoadMessageInfo() == nil { 248 ms.StoreMessageInfo(mi) 249 } 250 return ms 251 } 252 return mi.MessageOf(x) 253} 254 255// Deprecated: Use Signature.ProtoReflect.Descriptor instead. 256func (*Signature) Descriptor() ([]byte, []int) { 257 return file_google_devtools_containeranalysis_v1beta1_common_common_proto_rawDescGZIP(), []int{1} 258} 259 260func (x *Signature) GetSignature() []byte { 261 if x != nil { 262 return x.Signature 263 } 264 return nil 265} 266 267func (x *Signature) GetPublicKeyId() string { 268 if x != nil { 269 return x.PublicKeyId 270 } 271 return "" 272} 273 274var File_google_devtools_containeranalysis_v1beta1_common_common_proto protoreflect.FileDescriptor 275 276var file_google_devtools_containeranalysis_v1beta1_common_common_proto_rawDesc = []byte{ 277 0x0a, 0x3d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 0x6c, 278 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x61, 0x6e, 0x61, 0x6c, 0x79, 279 0x73, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 280 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 281 0x0f, 0x67, 0x72, 0x61, 0x66, 0x65, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 282 0x22, 0x34, 0x0a, 0x0a, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x55, 0x72, 0x6c, 0x12, 0x10, 283 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 284 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 285 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x4d, 0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 286 0x75, 0x72, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 287 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 288 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 289 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 290 0x4b, 0x65, 0x79, 0x49, 0x64, 0x2a, 0x8b, 0x01, 0x0a, 0x08, 0x4e, 0x6f, 0x74, 0x65, 0x4b, 0x69, 291 0x6e, 0x64, 0x12, 0x19, 0x0a, 0x15, 0x4e, 0x4f, 0x54, 0x45, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 292 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 293 0x0d, 0x56, 0x55, 0x4c, 0x4e, 0x45, 0x52, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x10, 0x01, 294 0x12, 0x09, 0x0a, 0x05, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x49, 295 0x4d, 0x41, 0x47, 0x45, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x41, 0x43, 0x4b, 0x41, 0x47, 296 0x45, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x4d, 0x45, 0x4e, 297 0x54, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x59, 298 0x10, 0x06, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x54, 0x54, 0x45, 0x53, 0x54, 0x41, 0x54, 0x49, 0x4f, 299 0x4e, 0x10, 0x07, 0x42, 0x7b, 0x0a, 0x19, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x61, 0x66, 0x65, 0x61, 300 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 301 0x50, 0x01, 0x5a, 0x56, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 302 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 303 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x64, 0x65, 0x76, 0x74, 0x6f, 0x6f, 304 0x6c, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x61, 0x6e, 0x61, 0x6c, 305 0x79, 0x73, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 306 0x6d, 0x6f, 0x6e, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x47, 0x52, 0x41, 307 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 308} 309 310var ( 311 file_google_devtools_containeranalysis_v1beta1_common_common_proto_rawDescOnce sync.Once 312 file_google_devtools_containeranalysis_v1beta1_common_common_proto_rawDescData = file_google_devtools_containeranalysis_v1beta1_common_common_proto_rawDesc 313) 314 315func file_google_devtools_containeranalysis_v1beta1_common_common_proto_rawDescGZIP() []byte { 316 file_google_devtools_containeranalysis_v1beta1_common_common_proto_rawDescOnce.Do(func() { 317 file_google_devtools_containeranalysis_v1beta1_common_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_devtools_containeranalysis_v1beta1_common_common_proto_rawDescData) 318 }) 319 return file_google_devtools_containeranalysis_v1beta1_common_common_proto_rawDescData 320} 321 322var file_google_devtools_containeranalysis_v1beta1_common_common_proto_enumTypes = make([]protoimpl.EnumInfo, 1) 323var file_google_devtools_containeranalysis_v1beta1_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 2) 324var file_google_devtools_containeranalysis_v1beta1_common_common_proto_goTypes = []interface{}{ 325 (NoteKind)(0), // 0: grafeas.v1beta1.NoteKind 326 (*RelatedUrl)(nil), // 1: grafeas.v1beta1.RelatedUrl 327 (*Signature)(nil), // 2: grafeas.v1beta1.Signature 328} 329var file_google_devtools_containeranalysis_v1beta1_common_common_proto_depIdxs = []int32{ 330 0, // [0:0] is the sub-list for method output_type 331 0, // [0:0] is the sub-list for method input_type 332 0, // [0:0] is the sub-list for extension type_name 333 0, // [0:0] is the sub-list for extension extendee 334 0, // [0:0] is the sub-list for field type_name 335} 336 337func init() { file_google_devtools_containeranalysis_v1beta1_common_common_proto_init() } 338func file_google_devtools_containeranalysis_v1beta1_common_common_proto_init() { 339 if File_google_devtools_containeranalysis_v1beta1_common_common_proto != nil { 340 return 341 } 342 if !protoimpl.UnsafeEnabled { 343 file_google_devtools_containeranalysis_v1beta1_common_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 344 switch v := v.(*RelatedUrl); i { 345 case 0: 346 return &v.state 347 case 1: 348 return &v.sizeCache 349 case 2: 350 return &v.unknownFields 351 default: 352 return nil 353 } 354 } 355 file_google_devtools_containeranalysis_v1beta1_common_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 356 switch v := v.(*Signature); i { 357 case 0: 358 return &v.state 359 case 1: 360 return &v.sizeCache 361 case 2: 362 return &v.unknownFields 363 default: 364 return nil 365 } 366 } 367 } 368 type x struct{} 369 out := protoimpl.TypeBuilder{ 370 File: protoimpl.DescBuilder{ 371 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 372 RawDescriptor: file_google_devtools_containeranalysis_v1beta1_common_common_proto_rawDesc, 373 NumEnums: 1, 374 NumMessages: 2, 375 NumExtensions: 0, 376 NumServices: 0, 377 }, 378 GoTypes: file_google_devtools_containeranalysis_v1beta1_common_common_proto_goTypes, 379 DependencyIndexes: file_google_devtools_containeranalysis_v1beta1_common_common_proto_depIdxs, 380 EnumInfos: file_google_devtools_containeranalysis_v1beta1_common_common_proto_enumTypes, 381 MessageInfos: file_google_devtools_containeranalysis_v1beta1_common_common_proto_msgTypes, 382 }.Build() 383 File_google_devtools_containeranalysis_v1beta1_common_common_proto = out.File 384 file_google_devtools_containeranalysis_v1beta1_common_common_proto_rawDesc = nil 385 file_google_devtools_containeranalysis_v1beta1_common_common_proto_goTypes = nil 386 file_google_devtools_containeranalysis_v1beta1_common_common_proto_depIdxs = nil 387} 388