2018-10-06 19:10:08 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-05-09 15:14:46 -04:00
|
|
|
module ContainerRegistry
|
2016-05-04 08:22:54 -04:00
|
|
|
class Config
|
|
|
|
attr_reader :tag, :blob, :data
|
|
|
|
|
|
|
|
def initialize(tag, blob)
|
2021-04-19 17:09:27 -04:00
|
|
|
@tag = tag
|
|
|
|
@blob = blob
|
2020-04-30 20:09:59 -04:00
|
|
|
@data = Gitlab::Json.parse(blob.data)
|
2016-05-04 08:22:54 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def [](key)
|
|
|
|
return unless data
|
2016-05-17 10:41:47 -04:00
|
|
|
|
2016-05-04 08:22:54 -04:00
|
|
|
data[key]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|