scanoss 1.20.0__py3-none-any.whl → 1.20.2__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.
- protoc_gen_swagger/__init__.py +13 -13
- protoc_gen_swagger/options/__init__.py +13 -13
- protoc_gen_swagger/options/annotations_pb2.py +12 -9
- protoc_gen_swagger/options/annotations_pb2_grpc.py +1 -1
- protoc_gen_swagger/options/openapiv2_pb2.py +98 -96
- protoc_gen_swagger/options/openapiv2_pb2_grpc.py +1 -1
- scanoss/__init__.py +18 -18
- scanoss/api/__init__.py +17 -17
- scanoss/api/common/__init__.py +17 -17
- scanoss/api/common/v2/__init__.py +17 -17
- scanoss/api/common/v2/scanoss_common_pb2.py +18 -18
- scanoss/api/common/v2/scanoss_common_pb2_grpc.py +1 -1
- scanoss/api/components/__init__.py +17 -17
- scanoss/api/components/v2/__init__.py +17 -17
- scanoss/api/components/v2/scanoss_components_pb2.py +48 -38
- scanoss/api/components/v2/scanoss_components_pb2_grpc.py +142 -96
- scanoss/api/cryptography/v2/scanoss_cryptography_pb2.py +22 -16
- scanoss/api/cryptography/v2/scanoss_cryptography_pb2_grpc.py +75 -49
- scanoss/api/dependencies/__init__.py +17 -17
- scanoss/api/dependencies/v2/__init__.py +17 -17
- scanoss/api/dependencies/v2/scanoss_dependencies_pb2.py +30 -24
- scanoss/api/dependencies/v2/scanoss_dependencies_pb2_grpc.py +75 -49
- scanoss/api/scanning/__init__.py +17 -17
- scanoss/api/scanning/v2/__init__.py +17 -17
- scanoss/api/scanning/v2/scanoss_scanning_pb2.py +10 -8
- scanoss/api/scanning/v2/scanoss_scanning_pb2_grpc.py +40 -32
- scanoss/api/semgrep/__init__.py +17 -17
- scanoss/api/semgrep/v2/__init__.py +17 -17
- scanoss/api/semgrep/v2/scanoss_semgrep_pb2.py +22 -18
- scanoss/api/semgrep/v2/scanoss_semgrep_pb2_grpc.py +71 -49
- scanoss/api/vulnerabilities/__init__.py +17 -17
- scanoss/api/vulnerabilities/v2/__init__.py +17 -17
- scanoss/api/vulnerabilities/v2/scanoss_vulnerabilities_pb2.py +37 -27
- scanoss/api/vulnerabilities/v2/scanoss_vulnerabilities_pb2_grpc.py +109 -72
- scanoss/cli.py +664 -356
- scanoss/components.py +67 -45
- scanoss/csvoutput.py +83 -56
- scanoss/cyclonedx.py +48 -46
- scanoss/data/build_date.txt +1 -1
- scanoss/file_filters.py +13 -15
- scanoss/filecount.py +43 -36
- scanoss/inspection/__init__.py +17 -17
- scanoss/inspection/copyleft.py +71 -58
- scanoss/inspection/policy_check.py +76 -53
- scanoss/inspection/undeclared_component.py +98 -75
- scanoss/inspection/utils/license_utils.py +66 -44
- scanoss/results.py +51 -60
- scanoss/scancodedeps.py +61 -38
- scanoss/scanner.py +203 -135
- scanoss/scanoss_settings.py +5 -3
- scanoss/scanossapi.py +98 -69
- scanoss/scanossbase.py +19 -19
- scanoss/scanossgrpc.py +73 -51
- scanoss/scanpostprocessor.py +9 -6
- scanoss/scantype.py +22 -21
- scanoss/spdxlite.py +265 -171
- scanoss/threadeddependencies.py +91 -61
- scanoss/threadedscanning.py +37 -31
- scanoss/utils/file.py +4 -4
- scanoss/winnowing.py +111 -47
- {scanoss-1.20.0.dist-info → scanoss-1.20.2.dist-info}/METADATA +1 -1
- scanoss-1.20.2.dist-info/RECORD +74 -0
- {scanoss-1.20.0.dist-info → scanoss-1.20.2.dist-info}/WHEEL +1 -1
- scanoss-1.20.0.dist-info/RECORD +0 -74
- {scanoss-1.20.0.dist-info → scanoss-1.20.2.dist-info}/LICENSE +0 -0
- {scanoss-1.20.0.dist-info → scanoss-1.20.2.dist-info}/entry_points.txt +0 -0
- {scanoss-1.20.0.dist-info → scanoss-1.20.2.dist-info}/top_level.txt +0 -0
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"""
|
|
2
|
-
|
|
2
|
+
SPDX-License-Identifier: MIT
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
Copyright (c) 2021, SCANOSS
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
The above copyright notice and this permission notice shall be included in
|
|
14
|
+
all copies or substantial portions of the Software.
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
+
THE SOFTWARE.
|
|
23
23
|
"""
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"""
|
|
2
|
-
|
|
2
|
+
SPDX-License-Identifier: MIT
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
Copyright (c) 2021, SCANOSS
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
The above copyright notice and this permission notice shall be included in
|
|
14
|
+
all copies or substantial portions of the Software.
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
+
THE SOFTWARE.
|
|
23
23
|
"""
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
3
|
# source: scanoss/api/components/v2/scanoss-components.proto
|
|
4
4
|
"""Generated protocol buffer code."""
|
|
5
|
+
|
|
5
6
|
from google.protobuf.internal import builder as _builder
|
|
6
7
|
from google.protobuf import descriptor as _descriptor
|
|
7
8
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
@@ -16,46 +17,55 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
|
|
|
16
17
|
from protoc_gen_swagger.options import annotations_pb2 as protoc__gen__swagger_dot_options_dot_annotations__pb2
|
|
17
18
|
|
|
18
19
|
|
|
19
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
|
|
20
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
|
|
21
|
+
b'\n2scanoss/api/components/v2/scanoss-components.proto\x12\x19scanoss.api.components.v2\x1a*scanoss/api/common/v2/scanoss-common.proto\x1a\x1cgoogle/api/annotations.proto\x1a,protoc-gen-swagger/options/annotations.proto"v\n\x11\x43ompSearchRequest\x12\x0e\n\x06search\x18\x01 \x01(\t\x12\x0e\n\x06vendor\x18\x02 \x01(\t\x12\x11\n\tcomponent\x18\x03 \x01(\t\x12\x0f\n\x07package\x18\x04 \x01(\t\x12\r\n\x05limit\x18\x06 \x01(\x05\x12\x0e\n\x06offset\x18\x07 \x01(\x05"\xca\x01\n\rCompStatistic\x12\x1a\n\x12total_source_files\x18\x01 \x01(\x05\x12\x13\n\x0btotal_lines\x18\x02 \x01(\x05\x12\x19\n\x11total_blank_lines\x18\x03 \x01(\x05\x12\x44\n\tlanguages\x18\x04 \x03(\x0b\x32\x31.scanoss.api.components.v2.CompStatistic.Language\x1a\'\n\x08Language\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x66iles\x18\x02 \x01(\x05"\xfb\x01\n\x15\x43ompStatisticResponse\x12\x45\n\x05purls\x18\x01 \x03(\x0b\x32\x36.scanoss.api.components.v2.CompStatisticResponse.Purls\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse\x1a\x64\n\x05Purls\x12\x0c\n\x04purl\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12<\n\nstatistics\x18\x03 \x01(\x0b\x32(.scanoss.api.components.v2.CompStatistic"\xd3\x01\n\x12\x43ompSearchResponse\x12K\n\ncomponents\x18\x01 \x03(\x0b\x32\x37.scanoss.api.components.v2.CompSearchResponse.Component\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse\x1a\x39\n\tComponent\x12\x11\n\tcomponent\x18\x01 \x01(\t\x12\x0c\n\x04purl\x18\x02 \x01(\t\x12\x0b\n\x03url\x18\x03 \x01(\t"1\n\x12\x43ompVersionRequest\x12\x0c\n\x04purl\x18\x01 \x01(\t\x12\r\n\x05limit\x18\x02 \x01(\x05"\xd6\x03\n\x13\x43ompVersionResponse\x12K\n\tcomponent\x18\x01 \x01(\x0b\x32\x38.scanoss.api.components.v2.CompVersionResponse.Component\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse\x1aO\n\x07License\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\x64\n\x07Version\x12\x0f\n\x07version\x18\x01 \x01(\t\x12H\n\x08licenses\x18\x04 \x03(\x0b\x32\x36.scanoss.api.components.v2.CompVersionResponse.License\x1a\x83\x01\n\tComponent\x12\x11\n\tcomponent\x18\x01 \x01(\t\x12\x0c\n\x04purl\x18\x02 \x01(\t\x12\x0b\n\x03url\x18\x03 \x01(\t\x12H\n\x08versions\x18\x04 \x03(\x0b\x32\x36.scanoss.api.components.v2.CompVersionResponse.Version2\xd4\x04\n\nComponents\x12s\n\x04\x45\x63ho\x12".scanoss.api.common.v2.EchoRequest\x1a#.scanoss.api.common.v2.EchoResponse""\x82\xd3\xe4\x93\x02\x1c"\x17/api/v2/components/echo:\x01*\x12\x95\x01\n\x10SearchComponents\x12,.scanoss.api.components.v2.CompSearchRequest\x1a-.scanoss.api.components.v2.CompSearchResponse"$\x82\xd3\xe4\x93\x02\x1e"\x19/api/v2/components/search:\x01*\x12\x9d\x01\n\x14GetComponentVersions\x12-.scanoss.api.components.v2.CompVersionRequest\x1a..scanoss.api.components.v2.CompVersionResponse"&\x82\xd3\xe4\x93\x02 "\x1b/api/v2/components/versions:\x01*\x12\x98\x01\n\x16GetComponentStatistics\x12".scanoss.api.common.v2.PurlRequest\x1a\x30.scanoss.api.components.v2.CompStatisticResponse"(\x82\xd3\xe4\x93\x02""\x1d/api/v2/components/statistics:\x01*B\x94\x02Z5github.com/scanoss/papi/api/componentsv2;componentsv2\x92\x41\xd9\x01\x12s\n\x1aSCANOSS Components Service"P\n\x12scanoss-components\x12%https://github.com/scanoss/components\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
|
+
)
|
|
20
23
|
|
|
21
24
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
|
|
22
25
|
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'scanoss.api.components.v2.scanoss_components_pb2', globals())
|
|
23
26
|
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
27
|
+
DESCRIPTOR._options = None
|
|
28
|
+
DESCRIPTOR._serialized_options = b'Z5github.com/scanoss/papi/api/componentsv2;componentsv2\222A\331\001\022s\n\032SCANOSS Components Service"P\n\022scanoss-components\022%https://github.com/scanoss/components\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
|
+
_COMPONENTS.methods_by_name['Echo']._options = None
|
|
30
|
+
_COMPONENTS.methods_by_name[
|
|
31
|
+
'Echo'
|
|
32
|
+
]._serialized_options = b'\202\323\344\223\002\034"\027/api/v2/components/echo:\001*'
|
|
33
|
+
_COMPONENTS.methods_by_name['SearchComponents']._options = None
|
|
34
|
+
_COMPONENTS.methods_by_name[
|
|
35
|
+
'SearchComponents'
|
|
36
|
+
]._serialized_options = b'\202\323\344\223\002\036"\031/api/v2/components/search:\001*'
|
|
37
|
+
_COMPONENTS.methods_by_name['GetComponentVersions']._options = None
|
|
38
|
+
_COMPONENTS.methods_by_name[
|
|
39
|
+
'GetComponentVersions'
|
|
40
|
+
]._serialized_options = b'\202\323\344\223\002 "\033/api/v2/components/versions:\001*'
|
|
41
|
+
_COMPONENTS.methods_by_name['GetComponentStatistics']._options = None
|
|
42
|
+
_COMPONENTS.methods_by_name[
|
|
43
|
+
'GetComponentStatistics'
|
|
44
|
+
]._serialized_options = b'\202\323\344\223\002""\035/api/v2/components/statistics:\001*'
|
|
45
|
+
_COMPSEARCHREQUEST._serialized_start = 201
|
|
46
|
+
_COMPSEARCHREQUEST._serialized_end = 319
|
|
47
|
+
_COMPSTATISTIC._serialized_start = 322
|
|
48
|
+
_COMPSTATISTIC._serialized_end = 524
|
|
49
|
+
_COMPSTATISTIC_LANGUAGE._serialized_start = 485
|
|
50
|
+
_COMPSTATISTIC_LANGUAGE._serialized_end = 524
|
|
51
|
+
_COMPSTATISTICRESPONSE._serialized_start = 527
|
|
52
|
+
_COMPSTATISTICRESPONSE._serialized_end = 778
|
|
53
|
+
_COMPSTATISTICRESPONSE_PURLS._serialized_start = 678
|
|
54
|
+
_COMPSTATISTICRESPONSE_PURLS._serialized_end = 778
|
|
55
|
+
_COMPSEARCHRESPONSE._serialized_start = 781
|
|
56
|
+
_COMPSEARCHRESPONSE._serialized_end = 992
|
|
57
|
+
_COMPSEARCHRESPONSE_COMPONENT._serialized_start = 935
|
|
58
|
+
_COMPSEARCHRESPONSE_COMPONENT._serialized_end = 992
|
|
59
|
+
_COMPVERSIONREQUEST._serialized_start = 994
|
|
60
|
+
_COMPVERSIONREQUEST._serialized_end = 1043
|
|
61
|
+
_COMPVERSIONRESPONSE._serialized_start = 1046
|
|
62
|
+
_COMPVERSIONRESPONSE._serialized_end = 1516
|
|
63
|
+
_COMPVERSIONRESPONSE_LICENSE._serialized_start = 1201
|
|
64
|
+
_COMPVERSIONRESPONSE_LICENSE._serialized_end = 1280
|
|
65
|
+
_COMPVERSIONRESPONSE_VERSION._serialized_start = 1282
|
|
66
|
+
_COMPVERSIONRESPONSE_VERSION._serialized_end = 1382
|
|
67
|
+
_COMPVERSIONRESPONSE_COMPONENT._serialized_start = 1385
|
|
68
|
+
_COMPVERSIONRESPONSE_COMPONENT._serialized_end = 1516
|
|
69
|
+
_COMPONENTS._serialized_start = 1519
|
|
70
|
+
_COMPONENTS._serialized_end = 2115
|
|
61
71
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -1,9 +1,12 @@
|
|
|
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
|
+
|
|
3
4
|
import grpc
|
|
4
5
|
|
|
5
6
|
from scanoss.api.common.v2 import scanoss_common_pb2 as scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2
|
|
6
|
-
from scanoss.api.components.v2 import
|
|
7
|
+
from scanoss.api.components.v2 import (
|
|
8
|
+
scanoss_components_pb2 as scanoss_dot_api_dot_components_dot_v2_dot_scanoss__components__pb2,
|
|
9
|
+
)
|
|
7
10
|
|
|
8
11
|
|
|
9
12
|
class ComponentsStub(object):
|
|
@@ -18,25 +21,25 @@ class ComponentsStub(object):
|
|
|
18
21
|
channel: A grpc.Channel.
|
|
19
22
|
"""
|
|
20
23
|
self.Echo = channel.unary_unary(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
'/scanoss.api.components.v2.Components/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
|
+
)
|
|
25
28
|
self.SearchComponents = channel.unary_unary(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
'/scanoss.api.components.v2.Components/SearchComponents',
|
|
30
|
+
request_serializer=scanoss_dot_api_dot_components_dot_v2_dot_scanoss__components__pb2.CompSearchRequest.SerializeToString,
|
|
31
|
+
response_deserializer=scanoss_dot_api_dot_components_dot_v2_dot_scanoss__components__pb2.CompSearchResponse.FromString,
|
|
32
|
+
)
|
|
30
33
|
self.GetComponentVersions = channel.unary_unary(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
'/scanoss.api.components.v2.Components/GetComponentVersions',
|
|
35
|
+
request_serializer=scanoss_dot_api_dot_components_dot_v2_dot_scanoss__components__pb2.CompVersionRequest.SerializeToString,
|
|
36
|
+
response_deserializer=scanoss_dot_api_dot_components_dot_v2_dot_scanoss__components__pb2.CompVersionResponse.FromString,
|
|
37
|
+
)
|
|
35
38
|
self.GetComponentStatistics = channel.unary_unary(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
'/scanoss.api.components.v2.Components/GetComponentStatistics',
|
|
40
|
+
request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.SerializeToString,
|
|
41
|
+
response_deserializer=scanoss_dot_api_dot_components_dot_v2_dot_scanoss__components__pb2.CompStatisticResponse.FromString,
|
|
42
|
+
)
|
|
40
43
|
|
|
41
44
|
|
|
42
45
|
class ComponentsServicer(object):
|
|
@@ -45,29 +48,25 @@ class ComponentsServicer(object):
|
|
|
45
48
|
"""
|
|
46
49
|
|
|
47
50
|
def Echo(self, request, context):
|
|
48
|
-
"""Standard echo
|
|
49
|
-
"""
|
|
51
|
+
"""Standard echo"""
|
|
50
52
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
51
53
|
context.set_details('Method not implemented!')
|
|
52
54
|
raise NotImplementedError('Method not implemented!')
|
|
53
55
|
|
|
54
56
|
def SearchComponents(self, request, context):
|
|
55
|
-
"""Search for components
|
|
56
|
-
"""
|
|
57
|
+
"""Search for components"""
|
|
57
58
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
58
59
|
context.set_details('Method not implemented!')
|
|
59
60
|
raise NotImplementedError('Method not implemented!')
|
|
60
61
|
|
|
61
62
|
def GetComponentVersions(self, request, context):
|
|
62
|
-
"""Get all version information for a specific component
|
|
63
|
-
"""
|
|
63
|
+
"""Get all version information for a specific component"""
|
|
64
64
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
65
65
|
context.set_details('Method not implemented!')
|
|
66
66
|
raise NotImplementedError('Method not implemented!')
|
|
67
67
|
|
|
68
68
|
def GetComponentStatistics(self, request, context):
|
|
69
|
-
"""Get the statistics for the specified components
|
|
70
|
-
"""
|
|
69
|
+
"""Get the statistics for the specified components"""
|
|
71
70
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
72
71
|
context.set_details('Method not implemented!')
|
|
73
72
|
raise NotImplementedError('Method not implemented!')
|
|
@@ -75,102 +74,149 @@ class ComponentsServicer(object):
|
|
|
75
74
|
|
|
76
75
|
def add_ComponentsServicer_to_server(servicer, server):
|
|
77
76
|
rpc_method_handlers = {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
77
|
+
'Echo': grpc.unary_unary_rpc_method_handler(
|
|
78
|
+
servicer.Echo,
|
|
79
|
+
request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.FromString,
|
|
80
|
+
response_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.SerializeToString,
|
|
81
|
+
),
|
|
82
|
+
'SearchComponents': grpc.unary_unary_rpc_method_handler(
|
|
83
|
+
servicer.SearchComponents,
|
|
84
|
+
request_deserializer=scanoss_dot_api_dot_components_dot_v2_dot_scanoss__components__pb2.CompSearchRequest.FromString,
|
|
85
|
+
response_serializer=scanoss_dot_api_dot_components_dot_v2_dot_scanoss__components__pb2.CompSearchResponse.SerializeToString,
|
|
86
|
+
),
|
|
87
|
+
'GetComponentVersions': grpc.unary_unary_rpc_method_handler(
|
|
88
|
+
servicer.GetComponentVersions,
|
|
89
|
+
request_deserializer=scanoss_dot_api_dot_components_dot_v2_dot_scanoss__components__pb2.CompVersionRequest.FromString,
|
|
90
|
+
response_serializer=scanoss_dot_api_dot_components_dot_v2_dot_scanoss__components__pb2.CompVersionResponse.SerializeToString,
|
|
91
|
+
),
|
|
92
|
+
'GetComponentStatistics': grpc.unary_unary_rpc_method_handler(
|
|
93
|
+
servicer.GetComponentStatistics,
|
|
94
|
+
request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.FromString,
|
|
95
|
+
response_serializer=scanoss_dot_api_dot_components_dot_v2_dot_scanoss__components__pb2.CompStatisticResponse.SerializeToString,
|
|
96
|
+
),
|
|
98
97
|
}
|
|
99
|
-
generic_handler = grpc.method_handlers_generic_handler(
|
|
100
|
-
'scanoss.api.components.v2.Components', rpc_method_handlers)
|
|
98
|
+
generic_handler = grpc.method_handlers_generic_handler('scanoss.api.components.v2.Components', rpc_method_handlers)
|
|
101
99
|
server.add_generic_rpc_handlers((generic_handler,))
|
|
102
100
|
|
|
103
101
|
|
|
104
|
-
|
|
102
|
+
# This class is part of an EXPERIMENTAL API.
|
|
105
103
|
class Components(object):
|
|
106
104
|
"""
|
|
107
105
|
Expose all of the SCANOSS Component RPCs here
|
|
108
106
|
"""
|
|
109
107
|
|
|
110
108
|
@staticmethod
|
|
111
|
-
def Echo(
|
|
109
|
+
def Echo(
|
|
110
|
+
request,
|
|
111
|
+
target,
|
|
112
|
+
options=(),
|
|
113
|
+
channel_credentials=None,
|
|
114
|
+
call_credentials=None,
|
|
115
|
+
insecure=False,
|
|
116
|
+
compression=None,
|
|
117
|
+
wait_for_ready=None,
|
|
118
|
+
timeout=None,
|
|
119
|
+
metadata=None,
|
|
120
|
+
):
|
|
121
|
+
return grpc.experimental.unary_unary(
|
|
122
|
+
request,
|
|
112
123
|
target,
|
|
113
|
-
|
|
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.components.v2.Components/Echo',
|
|
124
|
+
'/scanoss.api.components.v2.Components/Echo',
|
|
122
125
|
scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.SerializeToString,
|
|
123
126
|
scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.FromString,
|
|
124
|
-
options,
|
|
125
|
-
|
|
127
|
+
options,
|
|
128
|
+
channel_credentials,
|
|
129
|
+
insecure,
|
|
130
|
+
call_credentials,
|
|
131
|
+
compression,
|
|
132
|
+
wait_for_ready,
|
|
133
|
+
timeout,
|
|
134
|
+
metadata,
|
|
135
|
+
)
|
|
126
136
|
|
|
127
137
|
@staticmethod
|
|
128
|
-
def SearchComponents(
|
|
138
|
+
def SearchComponents(
|
|
139
|
+
request,
|
|
140
|
+
target,
|
|
141
|
+
options=(),
|
|
142
|
+
channel_credentials=None,
|
|
143
|
+
call_credentials=None,
|
|
144
|
+
insecure=False,
|
|
145
|
+
compression=None,
|
|
146
|
+
wait_for_ready=None,
|
|
147
|
+
timeout=None,
|
|
148
|
+
metadata=None,
|
|
149
|
+
):
|
|
150
|
+
return grpc.experimental.unary_unary(
|
|
151
|
+
request,
|
|
129
152
|
target,
|
|
130
|
-
|
|
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.components.v2.Components/SearchComponents',
|
|
153
|
+
'/scanoss.api.components.v2.Components/SearchComponents',
|
|
139
154
|
scanoss_dot_api_dot_components_dot_v2_dot_scanoss__components__pb2.CompSearchRequest.SerializeToString,
|
|
140
155
|
scanoss_dot_api_dot_components_dot_v2_dot_scanoss__components__pb2.CompSearchResponse.FromString,
|
|
141
|
-
options,
|
|
142
|
-
|
|
156
|
+
options,
|
|
157
|
+
channel_credentials,
|
|
158
|
+
insecure,
|
|
159
|
+
call_credentials,
|
|
160
|
+
compression,
|
|
161
|
+
wait_for_ready,
|
|
162
|
+
timeout,
|
|
163
|
+
metadata,
|
|
164
|
+
)
|
|
143
165
|
|
|
144
166
|
@staticmethod
|
|
145
|
-
def GetComponentVersions(
|
|
167
|
+
def GetComponentVersions(
|
|
168
|
+
request,
|
|
169
|
+
target,
|
|
170
|
+
options=(),
|
|
171
|
+
channel_credentials=None,
|
|
172
|
+
call_credentials=None,
|
|
173
|
+
insecure=False,
|
|
174
|
+
compression=None,
|
|
175
|
+
wait_for_ready=None,
|
|
176
|
+
timeout=None,
|
|
177
|
+
metadata=None,
|
|
178
|
+
):
|
|
179
|
+
return grpc.experimental.unary_unary(
|
|
180
|
+
request,
|
|
146
181
|
target,
|
|
147
|
-
|
|
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.components.v2.Components/GetComponentVersions',
|
|
182
|
+
'/scanoss.api.components.v2.Components/GetComponentVersions',
|
|
156
183
|
scanoss_dot_api_dot_components_dot_v2_dot_scanoss__components__pb2.CompVersionRequest.SerializeToString,
|
|
157
184
|
scanoss_dot_api_dot_components_dot_v2_dot_scanoss__components__pb2.CompVersionResponse.FromString,
|
|
158
|
-
options,
|
|
159
|
-
|
|
185
|
+
options,
|
|
186
|
+
channel_credentials,
|
|
187
|
+
insecure,
|
|
188
|
+
call_credentials,
|
|
189
|
+
compression,
|
|
190
|
+
wait_for_ready,
|
|
191
|
+
timeout,
|
|
192
|
+
metadata,
|
|
193
|
+
)
|
|
160
194
|
|
|
161
195
|
@staticmethod
|
|
162
|
-
def GetComponentStatistics(
|
|
196
|
+
def GetComponentStatistics(
|
|
197
|
+
request,
|
|
198
|
+
target,
|
|
199
|
+
options=(),
|
|
200
|
+
channel_credentials=None,
|
|
201
|
+
call_credentials=None,
|
|
202
|
+
insecure=False,
|
|
203
|
+
compression=None,
|
|
204
|
+
wait_for_ready=None,
|
|
205
|
+
timeout=None,
|
|
206
|
+
metadata=None,
|
|
207
|
+
):
|
|
208
|
+
return grpc.experimental.unary_unary(
|
|
209
|
+
request,
|
|
163
210
|
target,
|
|
164
|
-
|
|
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.components.v2.Components/GetComponentStatistics',
|
|
211
|
+
'/scanoss.api.components.v2.Components/GetComponentStatistics',
|
|
173
212
|
scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.SerializeToString,
|
|
174
213
|
scanoss_dot_api_dot_components_dot_v2_dot_scanoss__components__pb2.CompStatisticResponse.FromString,
|
|
175
|
-
options,
|
|
176
|
-
|
|
214
|
+
options,
|
|
215
|
+
channel_credentials,
|
|
216
|
+
insecure,
|
|
217
|
+
call_credentials,
|
|
218
|
+
compression,
|
|
219
|
+
wait_for_ready,
|
|
220
|
+
timeout,
|
|
221
|
+
metadata,
|
|
222
|
+
)
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
3
|
# source: scanoss/api/cryptography/v2/scanoss-cryptography.proto
|
|
4
4
|
"""Generated protocol buffer code."""
|
|
5
|
+
|
|
5
6
|
from google.protobuf.internal import builder as _builder
|
|
6
7
|
from google.protobuf import descriptor as _descriptor
|
|
7
8
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
@@ -16,24 +17,29 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
|
|
|
16
17
|
from protoc_gen_swagger.options import annotations_pb2 as protoc__gen__swagger_dot_options_dot_annotations__pb2
|
|
17
18
|
|
|
18
19
|
|
|
19
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
|
|
20
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
|
|
21
|
+
b'\n6scanoss/api/cryptography/v2/scanoss-cryptography.proto\x12\x1bscanoss.api.cryptography.v2\x1a*scanoss/api/common/v2/scanoss-common.proto\x1a\x1cgoogle/api/annotations.proto\x1a,protoc-gen-swagger/options/annotations.proto"\xb9\x02\n\x11\x41lgorithmResponse\x12\x43\n\x05purls\x18\x01 \x03(\x0b\x32\x34.scanoss.api.cryptography.v2.AlgorithmResponse.Purls\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse\x1a\x31\n\nAlgorithms\x12\x11\n\talgorithm\x18\x01 \x01(\t\x12\x10\n\x08strength\x18\x02 \x01(\t\x1au\n\x05Purls\x12\x0c\n\x04purl\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12M\n\nalgorithms\x18\x03 \x03(\x0b\x32\x39.scanoss.api.cryptography.v2.AlgorithmResponse.Algorithms2\x97\x02\n\x0c\x43ryptography\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/cryptography/echo:\x01*\x12\x8f\x01\n\rGetAlgorithms\x12".scanoss.api.common.v2.PurlRequest\x1a..scanoss.api.cryptography.v2.AlgorithmResponse"*\x82\xd3\xe4\x93\x02$"\x1f/api/v2/cryptography/algorithms:\x01*B\x9e\x02Z9github.com/scanoss/papi/api/cryptographyv2;cryptographyv2\x92\x41\xdf\x01\x12y\n\x1cSCANOSS Cryptography Service"T\n\x14scanoss-cryptography\x12\'https://github.com/scanoss/crpytography\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
|
+
)
|
|
20
23
|
|
|
21
24
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
|
|
22
25
|
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'scanoss.api.cryptography.v2.scanoss_cryptography_pb2', globals())
|
|
23
26
|
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
27
|
+
DESCRIPTOR._options = None
|
|
28
|
+
DESCRIPTOR._serialized_options = b'Z9github.com/scanoss/papi/api/cryptographyv2;cryptographyv2\222A\337\001\022y\n\034SCANOSS Cryptography Service"T\n\024scanoss-cryptography\022\'https://github.com/scanoss/crpytography\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
|
+
_CRYPTOGRAPHY.methods_by_name['Echo']._options = None
|
|
30
|
+
_CRYPTOGRAPHY.methods_by_name[
|
|
31
|
+
'Echo'
|
|
32
|
+
]._serialized_options = b'\202\323\344\223\002\036"\031/api/v2/cryptography/echo:\001*'
|
|
33
|
+
_CRYPTOGRAPHY.methods_by_name['GetAlgorithms']._options = None
|
|
34
|
+
_CRYPTOGRAPHY.methods_by_name[
|
|
35
|
+
'GetAlgorithms'
|
|
36
|
+
]._serialized_options = b'\202\323\344\223\002$"\037/api/v2/cryptography/algorithms:\001*'
|
|
37
|
+
_ALGORITHMRESPONSE._serialized_start = 208
|
|
38
|
+
_ALGORITHMRESPONSE._serialized_end = 521
|
|
39
|
+
_ALGORITHMRESPONSE_ALGORITHMS._serialized_start = 353
|
|
40
|
+
_ALGORITHMRESPONSE_ALGORITHMS._serialized_end = 402
|
|
41
|
+
_ALGORITHMRESPONSE_PURLS._serialized_start = 404
|
|
42
|
+
_ALGORITHMRESPONSE_PURLS._serialized_end = 521
|
|
43
|
+
_CRYPTOGRAPHY._serialized_start = 524
|
|
44
|
+
_CRYPTOGRAPHY._serialized_end = 803
|
|
39
45
|
# @@protoc_insertion_point(module_scope)
|