google-cloud-container_analysis 1.7.0 → 1.7.2
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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 273d411cecf9e74cf409d9db7799b1599727aab407cd1877ba33ceddf47ee2b4
|
|
4
|
+
data.tar.gz: ed4905dd90de8b8909aae13f3c6b2cd2bc929917677c7045249f4514de4a4dcd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9093070ed58757fa471de172c11c4450283cf02b1cc3adaff35a0f5dcf5ba608caa0bee97413b1db113c7d2d336d19c8ed7a68bc33c66046090858aa28820009
|
|
7
|
+
data.tar.gz: 1e0b7a0156d2b25105e4d7c24ec988d219dfdc613a6f145f46dc19203906d9d4bf5244b7423cdd5e135efdaf0cda90d7cea215878469dc179923875181a6fae6
|
data/README.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
# Ruby Client for the Container Analysis API
|
|
2
2
|
|
|
3
|
-
API
|
|
3
|
+
This API is a prerequisite for leveraging Artifact Analysis scanning capabilities in both Artifact Registry and with Advanced Vulnerability Insights (runtime scanning) in GKE. In addition, the Container Analysis API is an implementation of the Grafeas API, which enables storing, querying, and retrieval of critical metadata about all of your software artifacts.
|
|
4
4
|
|
|
5
|
-
The Container Analysis API is an implementation of Grafeas. It stores, and enables querying and retrieval of, critical metadata about all of your software artifacts.
|
|
6
5
|
|
|
7
6
|
Actual client classes for the various versions of this API are defined in
|
|
8
7
|
_versioned_ client gems, with names of the form `google-cloud-container_analysis-v*`.
|
|
@@ -18,9 +17,6 @@ themselves can be found in the client library documentation for the versioned
|
|
|
18
17
|
client gems:
|
|
19
18
|
[google-cloud-container_analysis-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-container_analysis-v1/latest).
|
|
20
19
|
|
|
21
|
-
See also the [Product Documentation](https://cloud.google.com/container-registry/docs/container-analysis)
|
|
22
|
-
for more usage information.
|
|
23
|
-
|
|
24
20
|
## Quick Start
|
|
25
21
|
|
|
26
22
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright
|
|
3
|
+
# Copyright 2026 Google LLC
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
# you may not use this file except in compliance with the License.
|
|
@@ -55,9 +55,11 @@ module Google
|
|
|
55
55
|
# `version` parameter. If the ContainerAnalysis service is
|
|
56
56
|
# supported by that API version, and the corresponding gem is available, the
|
|
57
57
|
# appropriate versioned client will be returned.
|
|
58
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
|
59
|
+
# the `transport` parameter.
|
|
58
60
|
#
|
|
59
61
|
# Raises an exception if the currently installed versioned client gem for the
|
|
60
|
-
# given API version does not support the ContainerAnalysis service.
|
|
62
|
+
# given API version does not support the given transport of the ContainerAnalysis service.
|
|
61
63
|
# You can determine whether the method will succeed by calling
|
|
62
64
|
# {Google::Cloud::ContainerAnalysis.container_analysis_available?}.
|
|
63
65
|
#
|
|
@@ -79,9 +81,10 @@ module Google
|
|
|
79
81
|
#
|
|
80
82
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
81
83
|
# Defaults to `:v1`.
|
|
84
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
|
82
85
|
# @return [::Object] A client object for the specified version.
|
|
83
86
|
#
|
|
84
|
-
def self.container_analysis version: :v1, &block
|
|
87
|
+
def self.container_analysis version: :v1, transport: :grpc, &block
|
|
85
88
|
require "google/cloud/container_analysis/#{version.to_s.downcase}"
|
|
86
89
|
|
|
87
90
|
package_name = Google::Cloud::ContainerAnalysis
|
|
@@ -89,6 +92,7 @@ module Google
|
|
|
89
92
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
90
93
|
.first
|
|
91
94
|
service_module = Google::Cloud::ContainerAnalysis.const_get(package_name).const_get(:ContainerAnalysis)
|
|
95
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
|
92
96
|
service_module.const_get(:Client).new(&block)
|
|
93
97
|
end
|
|
94
98
|
|
|
@@ -101,9 +105,10 @@ module Google
|
|
|
101
105
|
#
|
|
102
106
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
103
107
|
# Defaults to `:v1`.
|
|
108
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
|
104
109
|
# @return [boolean] Whether the service is available.
|
|
105
110
|
#
|
|
106
|
-
def self.container_analysis_available? version: :v1
|
|
111
|
+
def self.container_analysis_available? version: :v1, transport: :grpc
|
|
107
112
|
require "google/cloud/container_analysis/#{version.to_s.downcase}"
|
|
108
113
|
package_name = Google::Cloud::ContainerAnalysis
|
|
109
114
|
.constants
|
|
@@ -113,6 +118,10 @@ module Google
|
|
|
113
118
|
service_module = Google::Cloud::ContainerAnalysis.const_get package_name
|
|
114
119
|
return false unless service_module.const_defined? :ContainerAnalysis
|
|
115
120
|
service_module = service_module.const_get :ContainerAnalysis
|
|
121
|
+
if transport == :rest
|
|
122
|
+
return false unless service_module.const_defined? :Rest
|
|
123
|
+
service_module = service_module.const_get :Rest
|
|
124
|
+
end
|
|
116
125
|
service_module.const_defined? :Client
|
|
117
126
|
rescue ::LoadError
|
|
118
127
|
false
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: google-cloud-container_analysis
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.7.
|
|
4
|
+
version: 1.7.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Google LLC
|
|
@@ -43,9 +43,11 @@ dependencies:
|
|
|
43
43
|
- - "~>"
|
|
44
44
|
- !ruby/object:Gem::Version
|
|
45
45
|
version: '1.6'
|
|
46
|
-
description:
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
description: This API is a prerequisite for leveraging Artifact Analysis scanning
|
|
47
|
+
capabilities in both Artifact Registry and with Advanced Vulnerability Insights
|
|
48
|
+
(runtime scanning) in GKE. In addition, the Container Analysis API is an implementation
|
|
49
|
+
of the Grafeas API, which enables storing, querying, and retrieval of critical metadata
|
|
50
|
+
about all of your software artifacts.
|
|
49
51
|
email: googleapis-packages@google.com
|
|
50
52
|
executables: []
|
|
51
53
|
extensions: []
|
|
@@ -79,5 +81,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
79
81
|
requirements: []
|
|
80
82
|
rubygems_version: 3.6.9
|
|
81
83
|
specification_version: 4
|
|
82
|
-
summary: API
|
|
84
|
+
summary: This API is a prerequisite for leveraging Artifact Analysis scanning capabilities
|
|
85
|
+
in both Artifact Registry and with Advanced Vulnerability Insights (runtime scanning)
|
|
86
|
+
in GKE. In addition, the Container Analysis API is an implementation of the Grafeas
|
|
87
|
+
API, which enables storing, querying, and retrieval of critical metadata about all
|
|
88
|
+
of your software artifacts.
|
|
83
89
|
test_files: []
|