scanoss 1.20.6__py3-none-any.whl → 1.23.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. protoc_gen_swagger/options/annotations_pb2.py +9 -12
  2. protoc_gen_swagger/options/annotations_pb2_grpc.py +1 -1
  3. protoc_gen_swagger/options/openapiv2_pb2.py +96 -98
  4. protoc_gen_swagger/options/openapiv2_pb2_grpc.py +1 -1
  5. scanoss/__init__.py +1 -1
  6. scanoss/api/common/v2/scanoss_common_pb2.py +20 -18
  7. scanoss/api/common/v2/scanoss_common_pb2_grpc.py +1 -1
  8. scanoss/api/components/v2/scanoss_components_pb2.py +38 -48
  9. scanoss/api/components/v2/scanoss_components_pb2_grpc.py +96 -142
  10. scanoss/api/cryptography/v2/scanoss_cryptography_pb2.py +42 -22
  11. scanoss/api/cryptography/v2/scanoss_cryptography_pb2_grpc.py +185 -75
  12. scanoss/api/dependencies/v2/scanoss_dependencies_pb2.py +32 -30
  13. scanoss/api/dependencies/v2/scanoss_dependencies_pb2_grpc.py +83 -75
  14. scanoss/api/geoprovenance/v2/scanoss_geoprovenance_pb2.py +49 -0
  15. scanoss/api/geoprovenance/v2/scanoss_geoprovenance_pb2_grpc.py +142 -0
  16. scanoss/api/scanning/v2/scanoss_scanning_pb2.py +20 -10
  17. scanoss/api/scanning/v2/scanoss_scanning_pb2_grpc.py +70 -40
  18. scanoss/api/semgrep/v2/scanoss_semgrep_pb2.py +18 -22
  19. scanoss/api/semgrep/v2/scanoss_semgrep_pb2_grpc.py +49 -71
  20. scanoss/api/vulnerabilities/v2/scanoss_vulnerabilities_pb2.py +27 -37
  21. scanoss/api/vulnerabilities/v2/scanoss_vulnerabilities_pb2_grpc.py +72 -109
  22. scanoss/cli.py +393 -84
  23. scanoss/components.py +21 -11
  24. scanoss/constants.py +12 -0
  25. scanoss/data/build_date.txt +1 -1
  26. scanoss/file_filters.py +272 -57
  27. scanoss/results.py +92 -109
  28. scanoss/scanners/__init__.py +23 -0
  29. scanoss/scanners/container_scanner.py +474 -0
  30. scanoss/scanners/folder_hasher.py +302 -0
  31. scanoss/scanners/scanner_config.py +73 -0
  32. scanoss/scanners/scanner_hfh.py +173 -0
  33. scanoss/scanoss_settings.py +9 -5
  34. scanoss/scanossbase.py +9 -3
  35. scanoss/scanossgrpc.py +143 -18
  36. scanoss/threadedscanning.py +6 -6
  37. scanoss/utils/abstract_presenter.py +103 -0
  38. scanoss/utils/crc64.py +96 -0
  39. scanoss/utils/simhash.py +198 -0
  40. {scanoss-1.20.6.dist-info → scanoss-1.23.0.dist-info}/METADATA +2 -1
  41. scanoss-1.23.0.dist-info/RECORD +83 -0
  42. {scanoss-1.20.6.dist-info → scanoss-1.23.0.dist-info}/WHEEL +1 -1
  43. scanoss/api/provenance/v2/scanoss_provenance_pb2.py +0 -42
  44. scanoss/api/provenance/v2/scanoss_provenance_pb2_grpc.py +0 -108
  45. scanoss-1.20.6.dist-info/RECORD +0 -74
  46. /scanoss/api/{provenance → geoprovenance}/__init__.py +0 -0
  47. /scanoss/api/{provenance → geoprovenance}/v2/__init__.py +0 -0
  48. {scanoss-1.20.6.dist-info → scanoss-1.23.0.dist-info}/entry_points.txt +0 -0
  49. {scanoss-1.20.6.dist-info → scanoss-1.23.0.dist-info}/licenses/LICENSE +0 -0
  50. {scanoss-1.20.6.dist-info → scanoss-1.23.0.dist-info}/top_level.txt +0 -0
@@ -1,12 +1,9 @@
1
1
  # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
2
  """Client and server classes corresponding to protobuf-defined services."""
3
-
4
3
  import grpc
5
4
 
6
5
  from scanoss.api.common.v2 import scanoss_common_pb2 as scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2
7
- from scanoss.api.cryptography.v2 import (
8
- scanoss_cryptography_pb2 as scanoss_dot_api_dot_cryptography_dot_v2_dot_scanoss__cryptography__pb2,
9
- )
6
+ from scanoss.api.cryptography.v2 import scanoss_cryptography_pb2 as scanoss_dot_api_dot_cryptography_dot_v2_dot_scanoss__cryptography__pb2
10
7
 
11
8
 
12
9
  class CryptographyStub(object):
@@ -21,15 +18,35 @@ class CryptographyStub(object):
21
18
  channel: A grpc.Channel.
22
19
  """
23
20
  self.Echo = channel.unary_unary(
24
- '/scanoss.api.cryptography.v2.Cryptography/Echo',
25
- request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.SerializeToString,
26
- response_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.FromString,
27
- )
21
+ '/scanoss.api.cryptography.v2.Cryptography/Echo',
22
+ request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.SerializeToString,
23
+ response_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.FromString,
24
+ )
28
25
  self.GetAlgorithms = channel.unary_unary(
29
- '/scanoss.api.cryptography.v2.Cryptography/GetAlgorithms',
30
- request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.SerializeToString,
31
- response_deserializer=scanoss_dot_api_dot_cryptography_dot_v2_dot_scanoss__cryptography__pb2.AlgorithmResponse.FromString,
32
- )
26
+ '/scanoss.api.cryptography.v2.Cryptography/GetAlgorithms',
27
+ request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.SerializeToString,
28
+ response_deserializer=scanoss_dot_api_dot_cryptography_dot_v2_dot_scanoss__cryptography__pb2.AlgorithmResponse.FromString,
29
+ )
30
+ self.GetAlgorithmsInRange = channel.unary_unary(
31
+ '/scanoss.api.cryptography.v2.Cryptography/GetAlgorithmsInRange',
32
+ request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.SerializeToString,
33
+ response_deserializer=scanoss_dot_api_dot_cryptography_dot_v2_dot_scanoss__cryptography__pb2.AlgorithmsInRangeResponse.FromString,
34
+ )
35
+ self.GetVersionsInRange = channel.unary_unary(
36
+ '/scanoss.api.cryptography.v2.Cryptography/GetVersionsInRange',
37
+ request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.SerializeToString,
38
+ response_deserializer=scanoss_dot_api_dot_cryptography_dot_v2_dot_scanoss__cryptography__pb2.VersionsInRangeResponse.FromString,
39
+ )
40
+ self.GetHintsInRange = channel.unary_unary(
41
+ '/scanoss.api.cryptography.v2.Cryptography/GetHintsInRange',
42
+ request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.SerializeToString,
43
+ response_deserializer=scanoss_dot_api_dot_cryptography_dot_v2_dot_scanoss__cryptography__pb2.HintsInRangeResponse.FromString,
44
+ )
45
+ self.GetEncryptionHints = channel.unary_unary(
46
+ '/scanoss.api.cryptography.v2.Cryptography/GetEncryptionHints',
47
+ request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.SerializeToString,
48
+ response_deserializer=scanoss_dot_api_dot_cryptography_dot_v2_dot_scanoss__cryptography__pb2.HintsResponse.FromString,
49
+ )
33
50
 
34
51
 
35
52
  class CryptographyServicer(object):
@@ -38,13 +55,43 @@ class CryptographyServicer(object):
38
55
  """
39
56
 
40
57
  def Echo(self, request, context):
41
- """Standard echo"""
58
+ """Standard echo
59
+ """
42
60
  context.set_code(grpc.StatusCode.UNIMPLEMENTED)
43
61
  context.set_details('Method not implemented!')
44
62
  raise NotImplementedError('Method not implemented!')
45
63
 
46
64
  def GetAlgorithms(self, request, context):
47
- """Get Cryptographic algorithms associated with a list of PURLs"""
65
+ """Get Cryptographic algorithms associated with a list of PURLs and, optionally, a requirement
66
+ """
67
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
68
+ context.set_details('Method not implemented!')
69
+ raise NotImplementedError('Method not implemented!')
70
+
71
+ def GetAlgorithmsInRange(self, request, context):
72
+ """Given a list of PURLS and version ranges, get a list of cryptographic algorithms used
73
+ """
74
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
75
+ context.set_details('Method not implemented!')
76
+ raise NotImplementedError('Method not implemented!')
77
+
78
+ def GetVersionsInRange(self, request, context):
79
+ """Given a list of PURLS and version ranges, get a list of versions that do/do not contain cryptographic algorithms
80
+ """
81
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
82
+ context.set_details('Method not implemented!')
83
+ raise NotImplementedError('Method not implemented!')
84
+
85
+ def GetHintsInRange(self, request, context):
86
+ """Given a list of PURLS and version ranges, get hints related to protocol/library/sdk/framework
87
+ """
88
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
89
+ context.set_details('Method not implemented!')
90
+ raise NotImplementedError('Method not implemented!')
91
+
92
+ def GetEncryptionHints(self, request, context):
93
+ """Given a list of PURLS, get hints related to protocol/library/sdk/framework
94
+ """
48
95
  context.set_code(grpc.StatusCode.UNIMPLEMENTED)
49
96
  context.set_details('Method not implemented!')
50
97
  raise NotImplementedError('Method not implemented!')
@@ -52,83 +99,146 @@ class CryptographyServicer(object):
52
99
 
53
100
  def add_CryptographyServicer_to_server(servicer, server):
54
101
  rpc_method_handlers = {
55
- 'Echo': grpc.unary_unary_rpc_method_handler(
56
- servicer.Echo,
57
- request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.FromString,
58
- response_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.SerializeToString,
59
- ),
60
- 'GetAlgorithms': grpc.unary_unary_rpc_method_handler(
61
- servicer.GetAlgorithms,
62
- request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.FromString,
63
- response_serializer=scanoss_dot_api_dot_cryptography_dot_v2_dot_scanoss__cryptography__pb2.AlgorithmResponse.SerializeToString,
64
- ),
102
+ 'Echo': grpc.unary_unary_rpc_method_handler(
103
+ servicer.Echo,
104
+ request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.FromString,
105
+ response_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.SerializeToString,
106
+ ),
107
+ 'GetAlgorithms': grpc.unary_unary_rpc_method_handler(
108
+ servicer.GetAlgorithms,
109
+ request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.FromString,
110
+ response_serializer=scanoss_dot_api_dot_cryptography_dot_v2_dot_scanoss__cryptography__pb2.AlgorithmResponse.SerializeToString,
111
+ ),
112
+ 'GetAlgorithmsInRange': grpc.unary_unary_rpc_method_handler(
113
+ servicer.GetAlgorithmsInRange,
114
+ request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.FromString,
115
+ response_serializer=scanoss_dot_api_dot_cryptography_dot_v2_dot_scanoss__cryptography__pb2.AlgorithmsInRangeResponse.SerializeToString,
116
+ ),
117
+ 'GetVersionsInRange': grpc.unary_unary_rpc_method_handler(
118
+ servicer.GetVersionsInRange,
119
+ request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.FromString,
120
+ response_serializer=scanoss_dot_api_dot_cryptography_dot_v2_dot_scanoss__cryptography__pb2.VersionsInRangeResponse.SerializeToString,
121
+ ),
122
+ 'GetHintsInRange': grpc.unary_unary_rpc_method_handler(
123
+ servicer.GetHintsInRange,
124
+ request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.FromString,
125
+ response_serializer=scanoss_dot_api_dot_cryptography_dot_v2_dot_scanoss__cryptography__pb2.HintsInRangeResponse.SerializeToString,
126
+ ),
127
+ 'GetEncryptionHints': grpc.unary_unary_rpc_method_handler(
128
+ servicer.GetEncryptionHints,
129
+ request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.FromString,
130
+ response_serializer=scanoss_dot_api_dot_cryptography_dot_v2_dot_scanoss__cryptography__pb2.HintsResponse.SerializeToString,
131
+ ),
65
132
  }
66
133
  generic_handler = grpc.method_handlers_generic_handler(
67
- 'scanoss.api.cryptography.v2.Cryptography', rpc_method_handlers
68
- )
134
+ 'scanoss.api.cryptography.v2.Cryptography', rpc_method_handlers)
69
135
  server.add_generic_rpc_handlers((generic_handler,))
70
136
 
71
137
 
72
- # This class is part of an EXPERIMENTAL API.
138
+ # This class is part of an EXPERIMENTAL API.
73
139
  class Cryptography(object):
74
140
  """
75
141
  Expose all of the SCANOSS Cryptography RPCs here
76
142
  """
77
143
 
78
144
  @staticmethod
79
- def Echo(
80
- request,
81
- target,
82
- options=(),
83
- channel_credentials=None,
84
- call_credentials=None,
85
- insecure=False,
86
- compression=None,
87
- wait_for_ready=None,
88
- timeout=None,
89
- metadata=None,
90
- ):
91
- return grpc.experimental.unary_unary(
92
- request,
145
+ def Echo(request,
93
146
  target,
94
- '/scanoss.api.cryptography.v2.Cryptography/Echo',
147
+ options=(),
148
+ channel_credentials=None,
149
+ call_credentials=None,
150
+ insecure=False,
151
+ compression=None,
152
+ wait_for_ready=None,
153
+ timeout=None,
154
+ metadata=None):
155
+ return grpc.experimental.unary_unary(request, target, '/scanoss.api.cryptography.v2.Cryptography/Echo',
95
156
  scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.SerializeToString,
96
157
  scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.FromString,
97
- options,
98
- channel_credentials,
99
- insecure,
100
- call_credentials,
101
- compression,
102
- wait_for_ready,
103
- timeout,
104
- metadata,
105
- )
158
+ options, channel_credentials,
159
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
106
160
 
107
161
  @staticmethod
108
- def GetAlgorithms(
109
- request,
110
- target,
111
- options=(),
112
- channel_credentials=None,
113
- call_credentials=None,
114
- insecure=False,
115
- compression=None,
116
- wait_for_ready=None,
117
- timeout=None,
118
- metadata=None,
119
- ):
120
- return grpc.experimental.unary_unary(
121
- request,
162
+ def GetAlgorithms(request,
122
163
  target,
123
- '/scanoss.api.cryptography.v2.Cryptography/GetAlgorithms',
164
+ options=(),
165
+ channel_credentials=None,
166
+ call_credentials=None,
167
+ insecure=False,
168
+ compression=None,
169
+ wait_for_ready=None,
170
+ timeout=None,
171
+ metadata=None):
172
+ return grpc.experimental.unary_unary(request, target, '/scanoss.api.cryptography.v2.Cryptography/GetAlgorithms',
124
173
  scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.SerializeToString,
125
174
  scanoss_dot_api_dot_cryptography_dot_v2_dot_scanoss__cryptography__pb2.AlgorithmResponse.FromString,
126
- options,
127
- channel_credentials,
128
- insecure,
129
- call_credentials,
130
- compression,
131
- wait_for_ready,
132
- timeout,
133
- metadata,
134
- )
175
+ options, channel_credentials,
176
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
177
+
178
+ @staticmethod
179
+ def GetAlgorithmsInRange(request,
180
+ target,
181
+ options=(),
182
+ channel_credentials=None,
183
+ call_credentials=None,
184
+ insecure=False,
185
+ compression=None,
186
+ wait_for_ready=None,
187
+ timeout=None,
188
+ metadata=None):
189
+ return grpc.experimental.unary_unary(request, target, '/scanoss.api.cryptography.v2.Cryptography/GetAlgorithmsInRange',
190
+ scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.SerializeToString,
191
+ scanoss_dot_api_dot_cryptography_dot_v2_dot_scanoss__cryptography__pb2.AlgorithmsInRangeResponse.FromString,
192
+ options, channel_credentials,
193
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
194
+
195
+ @staticmethod
196
+ def GetVersionsInRange(request,
197
+ target,
198
+ options=(),
199
+ channel_credentials=None,
200
+ call_credentials=None,
201
+ insecure=False,
202
+ compression=None,
203
+ wait_for_ready=None,
204
+ timeout=None,
205
+ metadata=None):
206
+ return grpc.experimental.unary_unary(request, target, '/scanoss.api.cryptography.v2.Cryptography/GetVersionsInRange',
207
+ scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.SerializeToString,
208
+ scanoss_dot_api_dot_cryptography_dot_v2_dot_scanoss__cryptography__pb2.VersionsInRangeResponse.FromString,
209
+ options, channel_credentials,
210
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
211
+
212
+ @staticmethod
213
+ def GetHintsInRange(request,
214
+ target,
215
+ options=(),
216
+ channel_credentials=None,
217
+ call_credentials=None,
218
+ insecure=False,
219
+ compression=None,
220
+ wait_for_ready=None,
221
+ timeout=None,
222
+ metadata=None):
223
+ return grpc.experimental.unary_unary(request, target, '/scanoss.api.cryptography.v2.Cryptography/GetHintsInRange',
224
+ scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.SerializeToString,
225
+ scanoss_dot_api_dot_cryptography_dot_v2_dot_scanoss__cryptography__pb2.HintsInRangeResponse.FromString,
226
+ options, channel_credentials,
227
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
228
+
229
+ @staticmethod
230
+ def GetEncryptionHints(request,
231
+ target,
232
+ options=(),
233
+ channel_credentials=None,
234
+ call_credentials=None,
235
+ insecure=False,
236
+ compression=None,
237
+ wait_for_ready=None,
238
+ timeout=None,
239
+ metadata=None):
240
+ return grpc.experimental.unary_unary(request, target, '/scanoss.api.cryptography.v2.Cryptography/GetEncryptionHints',
241
+ scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.SerializeToString,
242
+ scanoss_dot_api_dot_cryptography_dot_v2_dot_scanoss__cryptography__pb2.HintsResponse.FromString,
243
+ options, channel_credentials,
244
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@@ -2,7 +2,6 @@
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
3
  # source: scanoss/api/dependencies/v2/scanoss-dependencies.proto
4
4
  """Generated protocol buffer code."""
5
-
6
5
  from google.protobuf.internal import builder as _builder
7
6
  from google.protobuf import descriptor as _descriptor
8
7
  from google.protobuf import descriptor_pool as _descriptor_pool
@@ -17,37 +16,40 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
17
16
  from protoc_gen_swagger.options import annotations_pb2 as protoc__gen__swagger_dot_options_dot_annotations__pb2
18
17
 
19
18
 
20
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
21
- b'\n6scanoss/api/dependencies/v2/scanoss-dependencies.proto\x12\x1bscanoss.api.dependencies.v2\x1a*scanoss/api/common/v2/scanoss-common.proto\x1a\x1cgoogle/api/annotations.proto\x1a,protoc-gen-swagger/options/annotations.proto"\xef\x01\n\x11\x44\x65pendencyRequest\x12\x43\n\x05\x66iles\x18\x01 \x03(\x0b\x32\x34.scanoss.api.dependencies.v2.DependencyRequest.Files\x12\r\n\x05\x64\x65pth\x18\x02 \x01(\x05\x1a*\n\x05Purls\x12\x0c\n\x04purl\x18\x01 \x01(\t\x12\x13\n\x0brequirement\x18\x02 \x01(\t\x1aZ\n\x05\x46iles\x12\x0c\n\x04\x66ile\x18\x01 \x01(\t\x12\x43\n\x05purls\x18\x02 \x03(\x0b\x32\x34.scanoss.api.dependencies.v2.DependencyRequest.Purls"\x98\x04\n\x12\x44\x65pendencyResponse\x12\x44\n\x05\x66iles\x18\x01 \x03(\x0b\x32\x35.scanoss.api.dependencies.v2.DependencyResponse.Files\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse\x1aP\n\x08Licenses\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07spdx_id\x18\x02 \x01(\t\x12\x18\n\x10is_spdx_approved\x18\x03 \x01(\x08\x12\x0b\n\x03url\x18\x04 \x01(\t\x1a\xaa\x01\n\x0c\x44\x65pendencies\x12\x11\n\tcomponent\x18\x01 \x01(\t\x12\x0c\n\x04purl\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\t\x12J\n\x08licenses\x18\x04 \x03(\x0b\x32\x38.scanoss.api.dependencies.v2.DependencyResponse.Licenses\x12\x0b\n\x03url\x18\x05 \x01(\t\x12\x0f\n\x07\x63omment\x18\x06 \x01(\t\x1a\x85\x01\n\x05\x46iles\x12\x0c\n\x04\x66ile\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\x0e\n\x06status\x18\x03 \x01(\t\x12R\n\x0c\x64\x65pendencies\x18\x04 \x03(\x0b\x32<.scanoss.api.dependencies.v2.DependencyResponse.Dependencies2\xa8\x02\n\x0c\x44\x65pendencies\x12u\n\x04\x45\x63ho\x12".scanoss.api.common.v2.EchoRequest\x1a#.scanoss.api.common.v2.EchoResponse"$\x82\xd3\xe4\x93\x02\x1e"\x19/api/v2/dependencies/echo:\x01*\x12\xa0\x01\n\x0fGetDependencies\x12..scanoss.api.dependencies.v2.DependencyRequest\x1a/.scanoss.api.dependencies.v2.DependencyResponse",\x82\xd3\xe4\x93\x02&"!/api/v2/dependencies/dependencies:\x01*B\x9c\x02Z9github.com/scanoss/papi/api/dependenciesv2;dependenciesv2\x92\x41\xdd\x01\x12w\n\x1aSCANOSS Dependency Service"T\n\x14scanoss-dependencies\x12\'https://github.com/scanoss/dependencies\x1a\x13support@scanoss.com2\x03\x32.0*\x01\x01\x32\x10\x61pplication/json:\x10\x61pplication/jsonR;\n\x03\x34\x30\x34\x12\x34\n*Returned when the resource does not exist.\x12\x06\n\x04\x9a\x02\x01\x07\x62\x06proto3'
22
- )
19
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n6scanoss/api/dependencies/v2/scanoss-dependencies.proto\x12\x1bscanoss.api.dependencies.v2\x1a*scanoss/api/common/v2/scanoss-common.proto\x1a\x1cgoogle/api/annotations.proto\x1a,protoc-gen-swagger/options/annotations.proto\"\xef\x01\n\x11\x44\x65pendencyRequest\x12\x43\n\x05\x66iles\x18\x01 \x03(\x0b\x32\x34.scanoss.api.dependencies.v2.DependencyRequest.Files\x12\r\n\x05\x64\x65pth\x18\x02 \x01(\x05\x1a*\n\x05Purls\x12\x0c\n\x04purl\x18\x01 \x01(\t\x12\x13\n\x0brequirement\x18\x02 \x01(\t\x1aZ\n\x05\x46iles\x12\x0c\n\x04\x66ile\x18\x01 \x01(\t\x12\x43\n\x05purls\x18\x02 \x03(\x0b\x32\x34.scanoss.api.dependencies.v2.DependencyRequest.Purls\"\x98\x04\n\x12\x44\x65pendencyResponse\x12\x44\n\x05\x66iles\x18\x01 \x03(\x0b\x32\x35.scanoss.api.dependencies.v2.DependencyResponse.Files\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse\x1aP\n\x08Licenses\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07spdx_id\x18\x02 \x01(\t\x12\x18\n\x10is_spdx_approved\x18\x03 \x01(\x08\x12\x0b\n\x03url\x18\x04 \x01(\t\x1a\xaa\x01\n\x0c\x44\x65pendencies\x12\x11\n\tcomponent\x18\x01 \x01(\t\x12\x0c\n\x04purl\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\t\x12J\n\x08licenses\x18\x04 \x03(\x0b\x32\x38.scanoss.api.dependencies.v2.DependencyResponse.Licenses\x12\x0b\n\x03url\x18\x05 \x01(\t\x12\x0f\n\x07\x63omment\x18\x06 \x01(\t\x1a\x85\x01\n\x05\x46iles\x12\x0c\n\x04\x66ile\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\x12\x0e\n\x06status\x18\x03 \x01(\t\x12R\n\x0c\x64\x65pendencies\x18\x04 \x03(\x0b\x32<.scanoss.api.dependencies.v2.DependencyResponse.Dependencies\"z\n\x1bTransitiveDependencyRequest\x12\x11\n\tecosystem\x18\x01 \x01(\t\x12\r\n\x05\x64\x65pth\x18\x02 \x01(\x05\x12\r\n\x05limit\x18\x03 \x01(\x05\x12*\n\x05purls\x18\x05 \x03(\x0b\x32\x1b.scanoss.api.common.v2.Purl\"\xe2\x01\n\x1cTransitiveDependencyResponse\x12\\\n\x0c\x64\x65pendencies\x18\x01 \x03(\x0b\x32\x46.scanoss.api.dependencies.v2.TransitiveDependencyResponse.Dependencies\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse\x1a-\n\x0c\x44\x65pendencies\x12\x0c\n\x04purl\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t2\xe7\x03\n\x0c\x44\x65pendencies\x12u\n\x04\x45\x63ho\x12\".scanoss.api.common.v2.EchoRequest\x1a#.scanoss.api.common.v2.EchoResponse\"$\x82\xd3\xe4\x93\x02\x1e\"\x19/api/v2/dependencies/echo:\x01*\x12\xa0\x01\n\x0fGetDependencies\x12..scanoss.api.dependencies.v2.DependencyRequest\x1a/.scanoss.api.dependencies.v2.DependencyResponse\",\x82\xd3\xe4\x93\x02&\"!/api/v2/dependencies/dependencies:\x01*\x12\xbc\x01\n\x19GetTransitiveDependencies\x12\x38.scanoss.api.dependencies.v2.TransitiveDependencyRequest\x1a\x39.scanoss.api.dependencies.v2.TransitiveDependencyResponse\"*\x82\xd3\xe4\x93\x02$\"\x1f/api/v2/dependencies/transitive:\x01*B\x9c\x02Z9github.com/scanoss/papi/api/dependenciesv2;dependenciesv2\x92\x41\xdd\x01\x12w\n\x1aSCANOSS Dependency Service\"T\n\x14scanoss-dependencies\x12\'https://github.com/scanoss/dependencies\x1a\x13support@scanoss.com2\x03\x32.0*\x01\x01\x32\x10\x61pplication/json:\x10\x61pplication/jsonR;\n\x03\x34\x30\x34\x12\x34\n*Returned when the resource does not exist.\x12\x06\n\x04\x9a\x02\x01\x07\x62\x06proto3')
23
20
 
24
21
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
25
22
  _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'scanoss.api.dependencies.v2.scanoss_dependencies_pb2', globals())
26
23
  if _descriptor._USE_C_DESCRIPTORS == False:
27
- DESCRIPTOR._options = None
28
- DESCRIPTOR._serialized_options = b'Z9github.com/scanoss/papi/api/dependenciesv2;dependenciesv2\222A\335\001\022w\n\032SCANOSS Dependency Service"T\n\024scanoss-dependencies\022\'https://github.com/scanoss/dependencies\032\023support@scanoss.com2\0032.0*\001\0012\020application/json:\020application/jsonR;\n\003404\0224\n*Returned when the resource does not exist.\022\006\n\004\232\002\001\007'
29
- _DEPENDENCIES.methods_by_name['Echo']._options = None
30
- _DEPENDENCIES.methods_by_name[
31
- 'Echo'
32
- ]._serialized_options = b'\202\323\344\223\002\036"\031/api/v2/dependencies/echo:\001*'
33
- _DEPENDENCIES.methods_by_name['GetDependencies']._options = None
34
- _DEPENDENCIES.methods_by_name[
35
- 'GetDependencies'
36
- ]._serialized_options = b'\202\323\344\223\002&"!/api/v2/dependencies/dependencies:\001*'
37
- _DEPENDENCYREQUEST._serialized_start = 208
38
- _DEPENDENCYREQUEST._serialized_end = 447
39
- _DEPENDENCYREQUEST_PURLS._serialized_start = 313
40
- _DEPENDENCYREQUEST_PURLS._serialized_end = 355
41
- _DEPENDENCYREQUEST_FILES._serialized_start = 357
42
- _DEPENDENCYREQUEST_FILES._serialized_end = 447
43
- _DEPENDENCYRESPONSE._serialized_start = 450
44
- _DEPENDENCYRESPONSE._serialized_end = 986
45
- _DEPENDENCYRESPONSE_LICENSES._serialized_start = 597
46
- _DEPENDENCYRESPONSE_LICENSES._serialized_end = 677
47
- _DEPENDENCYRESPONSE_DEPENDENCIES._serialized_start = 680
48
- _DEPENDENCYRESPONSE_DEPENDENCIES._serialized_end = 850
49
- _DEPENDENCYRESPONSE_FILES._serialized_start = 853
50
- _DEPENDENCYRESPONSE_FILES._serialized_end = 986
51
- _DEPENDENCIES._serialized_start = 989
52
- _DEPENDENCIES._serialized_end = 1285
24
+
25
+ DESCRIPTOR._options = None
26
+ DESCRIPTOR._serialized_options = b'Z9github.com/scanoss/papi/api/dependenciesv2;dependenciesv2\222A\335\001\022w\n\032SCANOSS Dependency Service\"T\n\024scanoss-dependencies\022\'https://github.com/scanoss/dependencies\032\023support@scanoss.com2\0032.0*\001\0012\020application/json:\020application/jsonR;\n\003404\0224\n*Returned when the resource does not exist.\022\006\n\004\232\002\001\007'
27
+ _DEPENDENCIES.methods_by_name['Echo']._options = None
28
+ _DEPENDENCIES.methods_by_name['Echo']._serialized_options = b'\202\323\344\223\002\036\"\031/api/v2/dependencies/echo:\001*'
29
+ _DEPENDENCIES.methods_by_name['GetDependencies']._options = None
30
+ _DEPENDENCIES.methods_by_name['GetDependencies']._serialized_options = b'\202\323\344\223\002&\"!/api/v2/dependencies/dependencies:\001*'
31
+ _DEPENDENCIES.methods_by_name['GetTransitiveDependencies']._options = None
32
+ _DEPENDENCIES.methods_by_name['GetTransitiveDependencies']._serialized_options = b'\202\323\344\223\002$\"\037/api/v2/dependencies/transitive:\001*'
33
+ _DEPENDENCYREQUEST._serialized_start=208
34
+ _DEPENDENCYREQUEST._serialized_end=447
35
+ _DEPENDENCYREQUEST_PURLS._serialized_start=313
36
+ _DEPENDENCYREQUEST_PURLS._serialized_end=355
37
+ _DEPENDENCYREQUEST_FILES._serialized_start=357
38
+ _DEPENDENCYREQUEST_FILES._serialized_end=447
39
+ _DEPENDENCYRESPONSE._serialized_start=450
40
+ _DEPENDENCYRESPONSE._serialized_end=986
41
+ _DEPENDENCYRESPONSE_LICENSES._serialized_start=597
42
+ _DEPENDENCYRESPONSE_LICENSES._serialized_end=677
43
+ _DEPENDENCYRESPONSE_DEPENDENCIES._serialized_start=680
44
+ _DEPENDENCYRESPONSE_DEPENDENCIES._serialized_end=850
45
+ _DEPENDENCYRESPONSE_FILES._serialized_start=853
46
+ _DEPENDENCYRESPONSE_FILES._serialized_end=986
47
+ _TRANSITIVEDEPENDENCYREQUEST._serialized_start=988
48
+ _TRANSITIVEDEPENDENCYREQUEST._serialized_end=1110
49
+ _TRANSITIVEDEPENDENCYRESPONSE._serialized_start=1113
50
+ _TRANSITIVEDEPENDENCYRESPONSE._serialized_end=1339
51
+ _TRANSITIVEDEPENDENCYRESPONSE_DEPENDENCIES._serialized_start=1294
52
+ _TRANSITIVEDEPENDENCYRESPONSE_DEPENDENCIES._serialized_end=1339
53
+ _DEPENDENCIES._serialized_start=1342
54
+ _DEPENDENCIES._serialized_end=1829
53
55
  # @@protoc_insertion_point(module_scope)
@@ -1,12 +1,9 @@
1
1
  # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
2
  """Client and server classes corresponding to protobuf-defined services."""
3
-
4
3
  import grpc
5
4
 
6
5
  from scanoss.api.common.v2 import scanoss_common_pb2 as scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2
7
- from scanoss.api.dependencies.v2 import (
8
- scanoss_dependencies_pb2 as scanoss_dot_api_dot_dependencies_dot_v2_dot_scanoss__dependencies__pb2,
9
- )
6
+ from scanoss.api.dependencies.v2 import scanoss_dependencies_pb2 as scanoss_dot_api_dot_dependencies_dot_v2_dot_scanoss__dependencies__pb2
10
7
 
11
8
 
12
9
  class DependenciesStub(object):
@@ -21,15 +18,20 @@ class DependenciesStub(object):
21
18
  channel: A grpc.Channel.
22
19
  """
23
20
  self.Echo = channel.unary_unary(
24
- '/scanoss.api.dependencies.v2.Dependencies/Echo',
25
- request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.SerializeToString,
26
- response_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.FromString,
27
- )
21
+ '/scanoss.api.dependencies.v2.Dependencies/Echo',
22
+ request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.SerializeToString,
23
+ response_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.FromString,
24
+ )
28
25
  self.GetDependencies = channel.unary_unary(
29
- '/scanoss.api.dependencies.v2.Dependencies/GetDependencies',
30
- request_serializer=scanoss_dot_api_dot_dependencies_dot_v2_dot_scanoss__dependencies__pb2.DependencyRequest.SerializeToString,
31
- response_deserializer=scanoss_dot_api_dot_dependencies_dot_v2_dot_scanoss__dependencies__pb2.DependencyResponse.FromString,
32
- )
26
+ '/scanoss.api.dependencies.v2.Dependencies/GetDependencies',
27
+ request_serializer=scanoss_dot_api_dot_dependencies_dot_v2_dot_scanoss__dependencies__pb2.DependencyRequest.SerializeToString,
28
+ response_deserializer=scanoss_dot_api_dot_dependencies_dot_v2_dot_scanoss__dependencies__pb2.DependencyResponse.FromString,
29
+ )
30
+ self.GetTransitiveDependencies = channel.unary_unary(
31
+ '/scanoss.api.dependencies.v2.Dependencies/GetTransitiveDependencies',
32
+ request_serializer=scanoss_dot_api_dot_dependencies_dot_v2_dot_scanoss__dependencies__pb2.TransitiveDependencyRequest.SerializeToString,
33
+ response_deserializer=scanoss_dot_api_dot_dependencies_dot_v2_dot_scanoss__dependencies__pb2.TransitiveDependencyResponse.FromString,
34
+ )
33
35
 
34
36
 
35
37
  class DependenciesServicer(object):
@@ -38,13 +40,22 @@ class DependenciesServicer(object):
38
40
  """
39
41
 
40
42
  def Echo(self, request, context):
41
- """Standard echo"""
43
+ """Standard echo
44
+ """
42
45
  context.set_code(grpc.StatusCode.UNIMPLEMENTED)
43
46
  context.set_details('Method not implemented!')
44
47
  raise NotImplementedError('Method not implemented!')
45
48
 
46
49
  def GetDependencies(self, request, context):
47
- """Get dependency details"""
50
+ """Get dependency details
51
+ """
52
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
53
+ context.set_details('Method not implemented!')
54
+ raise NotImplementedError('Method not implemented!')
55
+
56
+ def GetTransitiveDependencies(self, request, context):
57
+ """Get transitive dependency details
58
+ """
48
59
  context.set_code(grpc.StatusCode.UNIMPLEMENTED)
49
60
  context.set_details('Method not implemented!')
50
61
  raise NotImplementedError('Method not implemented!')
@@ -52,83 +63,80 @@ class DependenciesServicer(object):
52
63
 
53
64
  def add_DependenciesServicer_to_server(servicer, server):
54
65
  rpc_method_handlers = {
55
- 'Echo': grpc.unary_unary_rpc_method_handler(
56
- servicer.Echo,
57
- request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.FromString,
58
- response_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.SerializeToString,
59
- ),
60
- 'GetDependencies': grpc.unary_unary_rpc_method_handler(
61
- servicer.GetDependencies,
62
- request_deserializer=scanoss_dot_api_dot_dependencies_dot_v2_dot_scanoss__dependencies__pb2.DependencyRequest.FromString,
63
- response_serializer=scanoss_dot_api_dot_dependencies_dot_v2_dot_scanoss__dependencies__pb2.DependencyResponse.SerializeToString,
64
- ),
66
+ 'Echo': grpc.unary_unary_rpc_method_handler(
67
+ servicer.Echo,
68
+ request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.FromString,
69
+ response_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.SerializeToString,
70
+ ),
71
+ 'GetDependencies': grpc.unary_unary_rpc_method_handler(
72
+ servicer.GetDependencies,
73
+ request_deserializer=scanoss_dot_api_dot_dependencies_dot_v2_dot_scanoss__dependencies__pb2.DependencyRequest.FromString,
74
+ response_serializer=scanoss_dot_api_dot_dependencies_dot_v2_dot_scanoss__dependencies__pb2.DependencyResponse.SerializeToString,
75
+ ),
76
+ 'GetTransitiveDependencies': grpc.unary_unary_rpc_method_handler(
77
+ servicer.GetTransitiveDependencies,
78
+ request_deserializer=scanoss_dot_api_dot_dependencies_dot_v2_dot_scanoss__dependencies__pb2.TransitiveDependencyRequest.FromString,
79
+ response_serializer=scanoss_dot_api_dot_dependencies_dot_v2_dot_scanoss__dependencies__pb2.TransitiveDependencyResponse.SerializeToString,
80
+ ),
65
81
  }
66
82
  generic_handler = grpc.method_handlers_generic_handler(
67
- 'scanoss.api.dependencies.v2.Dependencies', rpc_method_handlers
68
- )
83
+ 'scanoss.api.dependencies.v2.Dependencies', rpc_method_handlers)
69
84
  server.add_generic_rpc_handlers((generic_handler,))
70
85
 
71
86
 
72
- # This class is part of an EXPERIMENTAL API.
87
+ # This class is part of an EXPERIMENTAL API.
73
88
  class Dependencies(object):
74
89
  """
75
90
  Expose all of the SCANOSS Dependency RPCs here
76
91
  """
77
92
 
78
93
  @staticmethod
79
- def Echo(
80
- request,
81
- target,
82
- options=(),
83
- channel_credentials=None,
84
- call_credentials=None,
85
- insecure=False,
86
- compression=None,
87
- wait_for_ready=None,
88
- timeout=None,
89
- metadata=None,
90
- ):
91
- return grpc.experimental.unary_unary(
92
- request,
94
+ def Echo(request,
93
95
  target,
94
- '/scanoss.api.dependencies.v2.Dependencies/Echo',
96
+ options=(),
97
+ channel_credentials=None,
98
+ call_credentials=None,
99
+ insecure=False,
100
+ compression=None,
101
+ wait_for_ready=None,
102
+ timeout=None,
103
+ metadata=None):
104
+ return grpc.experimental.unary_unary(request, target, '/scanoss.api.dependencies.v2.Dependencies/Echo',
95
105
  scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.SerializeToString,
96
106
  scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.FromString,
97
- options,
98
- channel_credentials,
99
- insecure,
100
- call_credentials,
101
- compression,
102
- wait_for_ready,
103
- timeout,
104
- metadata,
105
- )
107
+ options, channel_credentials,
108
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
106
109
 
107
110
  @staticmethod
108
- def GetDependencies(
109
- request,
110
- target,
111
- options=(),
112
- channel_credentials=None,
113
- call_credentials=None,
114
- insecure=False,
115
- compression=None,
116
- wait_for_ready=None,
117
- timeout=None,
118
- metadata=None,
119
- ):
120
- return grpc.experimental.unary_unary(
121
- request,
111
+ def GetDependencies(request,
122
112
  target,
123
- '/scanoss.api.dependencies.v2.Dependencies/GetDependencies',
113
+ options=(),
114
+ channel_credentials=None,
115
+ call_credentials=None,
116
+ insecure=False,
117
+ compression=None,
118
+ wait_for_ready=None,
119
+ timeout=None,
120
+ metadata=None):
121
+ return grpc.experimental.unary_unary(request, target, '/scanoss.api.dependencies.v2.Dependencies/GetDependencies',
124
122
  scanoss_dot_api_dot_dependencies_dot_v2_dot_scanoss__dependencies__pb2.DependencyRequest.SerializeToString,
125
123
  scanoss_dot_api_dot_dependencies_dot_v2_dot_scanoss__dependencies__pb2.DependencyResponse.FromString,
126
- options,
127
- channel_credentials,
128
- insecure,
129
- call_credentials,
130
- compression,
131
- wait_for_ready,
132
- timeout,
133
- metadata,
134
- )
124
+ options, channel_credentials,
125
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
126
+
127
+ @staticmethod
128
+ def GetTransitiveDependencies(request,
129
+ target,
130
+ options=(),
131
+ channel_credentials=None,
132
+ call_credentials=None,
133
+ insecure=False,
134
+ compression=None,
135
+ wait_for_ready=None,
136
+ timeout=None,
137
+ metadata=None):
138
+ return grpc.experimental.unary_unary(request, target, '/scanoss.api.dependencies.v2.Dependencies/GetTransitiveDependencies',
139
+ scanoss_dot_api_dot_dependencies_dot_v2_dot_scanoss__dependencies__pb2.TransitiveDependencyRequest.SerializeToString,
140
+ scanoss_dot_api_dot_dependencies_dot_v2_dot_scanoss__dependencies__pb2.TransitiveDependencyResponse.FromString,
141
+ options, channel_credentials,
142
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)