2018-12-13 13:39:08 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-06-02 11:05:42 +05:30
|
|
|
module ContainerRegistry
|
|
|
|
class Config
|
|
|
|
attr_reader :tag, :blob, :data
|
|
|
|
|
|
|
|
def initialize(tag, blob)
|
|
|
|
@tag, @blob = tag, blob
|
2020-05-24 23:13:21 +05:30
|
|
|
@data = Gitlab::Json.parse(blob.data)
|
2016-06-02 11:05:42 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
def [](key)
|
|
|
|
return unless data
|
|
|
|
|
|
|
|
data[key]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|