Class: Dapp::Dimg::DockerRegistry::Dimg

Inherits:
Base
  • Object
show all
Defined in:
lib/dapp/dimg/docker_registry/dimg.rb

Direct Known Subclasses

Default

Constant Summary

Constants inherited from Base

Base::API_VERSION

Instance Attribute Summary

Attributes inherited from Base

#hostname_url, #repo, #repo_suffix

Instance Method Summary collapse

Methods inherited from Base

#initialize

Methods included from Base::Authorization

#authorization_auth, #authorization_options, #authorization_token, #auths_section_from_docker_config, #handle_scope_option, #parse_authenticate_header

Methods included from Base::Request

included, #raw_request, #request, #url_available?

Constructor Details

This class inherits a constructor from Dapp::Dimg::DockerRegistry::Base

Instance Method Details

#dimg_tags(dimg_name) ⇒ Object



9
10
11
# File 'lib/dapp/dimg/docker_registry/dimg.rb', line 9

def dimg_tags(dimg_name)
  with_repo_suffix(dimg_name.to_s) { tags }
end

#dimgstages_tagsObject



5
6
7
# File 'lib/dapp/dimg/docker_registry/dimg.rb', line 5

def dimgstages_tags
  tags.select { |tag| tag.start_with?('dimgstage') }
end

#image_delete(tag, extra_repo_suffix = nil) ⇒ Object



36
37
38
# File 'lib/dapp/dimg/docker_registry/dimg.rb', line 36

def image_delete(tag, extra_repo_suffix = nil)
  with_repo_suffix(extra_repo_suffix.to_s) { super(tag) }
end

#image_history(tag, extra_repo_suffix = nil) ⇒ Object



40
41
42
43
44
# File 'lib/dapp/dimg/docker_registry/dimg.rb', line 40

def image_history(tag, extra_repo_suffix = nil)
  with_repo_suffix(extra_repo_suffix.to_s) do
    (@image_history ||= {})[[repo_suffix, tag]] ||= super(tag)
  end
end

#image_id(tag, extra_repo_suffix = nil) ⇒ Object



24
25
26
# File 'lib/dapp/dimg/docker_registry/dimg.rb', line 24

def image_id(tag, extra_repo_suffix = nil)
  with_repo_suffix(extra_repo_suffix.to_s) { super(tag) }
end

#image_labels(tag, extra_repo_suffix = nil) ⇒ Object



32
33
34
# File 'lib/dapp/dimg/docker_registry/dimg.rb', line 32

def image_labels(tag, extra_repo_suffix = nil)
  with_repo_suffix(extra_repo_suffix.to_s) { super(tag) }
end

#image_parent_id(tag, extra_repo_suffix = nil) ⇒ Object



28
29
30
# File 'lib/dapp/dimg/docker_registry/dimg.rb', line 28

def image_parent_id(tag, extra_repo_suffix = nil)
  with_repo_suffix(extra_repo_suffix.to_s) { super(tag) }
end

#nameless_dimg_tagsObject



13
14
15
# File 'lib/dapp/dimg/docker_registry/dimg.rb', line 13

def nameless_dimg_tags
  tags.select { |tag| !tag.start_with?('dimgstage') }
end

#tagsObject



17
18
19
20
21
22
# File 'lib/dapp/dimg/docker_registry/dimg.rb', line 17

def tags
  super
rescue ::Dapp::Dimg::DockerRegistry::Error::Base => e
  raise unless e.net_status[:code] == :page_not_found
  []
end