Class: ContainerRegistry::Registry

Inherits:
Object
  • Object
show all
Defined in:
lib/container_registry/registry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uri, options = {}) ⇒ Registry

Returns a new instance of Registry.



7
8
9
10
11
12
13
14
15
# File 'lib/container_registry/registry.rb', line 7

def initialize(uri, options = {})
  @uri = uri
  @options = options
  @path = @options[:path] || default_path
  @client = ContainerRegistry::Client.new(@uri, @options)

  import_token = Auth::ContainerRegistryAuthenticationService.import_access_token
  @gitlab_api_client = ContainerRegistry::GitlabApiClient.new(@uri, @options.merge(import_token: import_token))
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



5
6
7
# File 'lib/container_registry/registry.rb', line 5

def client
  @client
end

#gitlab_api_clientObject (readonly)

Returns the value of attribute gitlab_api_client.



5
6
7
# File 'lib/container_registry/registry.rb', line 5

def gitlab_api_client
  @gitlab_api_client
end

#pathObject (readonly)

Returns the value of attribute path.



5
6
7
# File 'lib/container_registry/registry.rb', line 5

def path
  @path
end

#uriObject (readonly)

Returns the value of attribute uri.



5
6
7
# File 'lib/container_registry/registry.rb', line 5

def uri
  @uri
end