Class: Sigstore::Rekor::Client
- Inherits:
-
Object
- Object
- Sigstore::Rekor::Client
- Defined in:
- lib/sigstore/rekor/client.rb
Constant Summary collapse
- DEFAULT_REKOR_URL =
"https://rekor.sigstore.dev"
- STAGING_REKOR_URL =
"https://rekor.sigstage.dev"
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(url:) ⇒ Client
constructor
A new instance of Client.
- #log ⇒ Object
Constructor Details
#initialize(url:) ⇒ Client
Returns a new instance of Client.
25 26 27 28 29 30 31 |
# File 'lib/sigstore/rekor/client.rb', line 25 def initialize(url:) @url = URI.join(url, "api/v1/") net = defined?(Gem::Net) ? Gem::Net : Net @session = net::HTTP.new(@url.host, @url.port) @session.use_ssl = true end |
Class Method Details
.production ⇒ Object
33 34 35 |
# File 'lib/sigstore/rekor/client.rb', line 33 def self.production new(url: DEFAULT_REKOR_URL) end |
.staging ⇒ Object
37 38 39 |
# File 'lib/sigstore/rekor/client.rb', line 37 def self.staging new(url: STAGING_REKOR_URL) end |