...

Source file src/google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/common/common.pb.go

Documentation: google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1/common

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

View as plain text