Class: UffizziCore::ContainerRegistry::GoogleService

Inherits:
Object
  • Object
show all
Defined in:
app/services/uffizzi_core/container_registry/google_service.rb

Class Method Summary collapse

Class Method Details

.credential_correct?(credential) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'app/services/uffizzi_core/container_registry/google_service.rb', line 15

def credential_correct?(credential)
  client(credential).authenticated?
end

.digest(credential, image, tag) ⇒ Object



5
6
7
8
9
# File 'app/services/uffizzi_core/container_registry/google_service.rb', line 5

def digest(credential, image, tag)
  response = client(credential).manifests(image: image, tag: tag)

  response.headers['docker-content-digest']
end

.image_available?(credential, _image_data) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
# File 'app/services/uffizzi_core/container_registry/google_service.rb', line 11

def image_available?(credential, _image_data)
  credential.present?
end