1 // Copyright 2018 Google Inc.
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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.
17 package google.devtools.containeranalysis.v1alpha1;
19 import "google/api/annotations.proto";
21 option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1alpha1;containeranalysis";
22 option java_multiple_files = true;
23 option java_package = "com.google.containeranalysis.v1alpha1";
24 option objc_class_prefix = "GCA";
26 // A SourceContext is a reference to a tree of files. A SourceContext together
27 // with a path point to a unique revision of a single file or directory.
28 message SourceContext {
29 // A SourceContext can refer any one of the following types of repositories.
31 // A SourceContext referring to a revision in a Google Cloud Source Repo.
32 CloudRepoSourceContext cloud_repo = 1;
34 // A SourceContext referring to a Gerrit project.
35 GerritSourceContext gerrit = 2;
37 // A SourceContext referring to any third party Git repo (e.g., GitHub).
38 GitSourceContext git = 3;
41 // Labels with user defined metadata.
42 map<string, string> labels = 4;
45 // An alias to a repo revision.
46 message AliasContext {
47 // The type of an alias.
58 // Used to specify non-standard aliases. For example, if a Git repo has a
59 // ref named "refs/foo/bar".
70 // A CloudRepoSourceContext denotes a particular revision in a Google Cloud
72 message CloudRepoSourceContext {
73 // The ID of the repo.
76 // A revision in a Cloud Repo can be identified by either its revision ID or
80 string revision_id = 2;
82 // An alias, which may be a branch or tag.
83 AliasContext alias_context = 3;
87 // A SourceContext referring to a Gerrit project.
88 message GerritSourceContext {
89 // The URI of a running Gerrit instance.
92 // The full project name within the host. Projects may be nested, so
93 // "project/subproject" is a valid project name. The "repo name" is
94 // the hostURI/project.
95 string gerrit_project = 2;
97 // A revision in a Gerrit project can be identified by either its revision ID
100 // A revision (commit) ID.
101 string revision_id = 3;
103 // An alias, which may be a branch or tag.
104 AliasContext alias_context = 4;
108 // A GitSourceContext denotes a particular revision in a third party Git
109 // repository (e.g., GitHub).
110 message GitSourceContext {
111 // Git repository URL.
116 string revision_id = 2;
119 // A unique identifier for a Cloud Repo.
121 // A cloud repo can be identified by either its project ID and repository name
122 // combination, or its globally unique identifier.
124 // A combination of a project ID and a repo name.
125 ProjectRepoId project_repo_id = 1;
127 // A server-assigned, globally unique identifier.
132 // Selects a repo using a Google Cloud Platform project ID (e.g.,
133 // winged-cargo-31) and a repo name within that project.
134 message ProjectRepoId {
135 // The ID of the project.
136 string project_id = 1;
138 // The name of the repo. Leave empty for the default repo.
139 string repo_name = 2;