Class: DockerCloud::Client
- Inherits:
-
Object
- Object
- DockerCloud::Client
- Defined in:
- lib/docker_cloud.rb
Defined Under Namespace
Classes: ApiType
Instance Attribute Summary collapse
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
- #availability_zones ⇒ Object
- #containers ⇒ Object
- #events ⇒ Object
- #external_repositories ⇒ Object
- #headers ⇒ Object
-
#initialize(username, api_key) ⇒ Client
constructor
A new instance of Client.
- #node_clusters ⇒ Object
- #node_types ⇒ Object
- #nodes ⇒ Object
- #providers ⇒ Object
- #regions ⇒ Object
- #registries ⇒ Object
- #services ⇒ Object
- #stacks ⇒ Object
Constructor Details
#initialize(username, api_key) ⇒ Client
Returns a new instance of Client.
51 52 53 54 |
# File 'lib/docker_cloud.rb', line 51 def initialize(username, api_key) @username = username @api_key = api_key end |
Instance Attribute Details
#username ⇒ Object (readonly)
Returns the value of attribute username.
42 43 44 |
# File 'lib/docker_cloud.rb', line 42 def username @username end |
Instance Method Details
#availability_zones ⇒ Object
72 73 74 |
# File 'lib/docker_cloud.rb', line 72 def availability_zones @availability_zones ||= DockerCloud::AvailabilityZoneAPI.new(headers, ApiType::INFRASTRUCTURE, self) end |
#containers ⇒ Object
105 106 107 |
# File 'lib/docker_cloud.rb', line 105 def containers @containers ||= DockerCloud::ContainerAPI.new(headers, ApiType::APPLICATION, self) end |
#events ⇒ Object
109 110 111 |
# File 'lib/docker_cloud.rb', line 109 def events @containers ||= DockerCloud::EventsAPI.new(headers, ApiType::AUDIT, self) end |
#external_repositories ⇒ Object
92 93 94 95 |
# File 'lib/docker_cloud.rb', line 92 def external_repositories @repositories ||= DockerCloud::ExternalRepositoryAPI.new(headers, ApiType::REPOSITORY, self) end |
#headers ⇒ Object
56 57 58 59 60 61 62 |
# File 'lib/docker_cloud.rb', line 56 def headers { 'Authorization' => , 'Accept' => 'application/json', 'Content-Type' => 'application/json' } end |
#node_clusters ⇒ Object
80 81 82 |
# File 'lib/docker_cloud.rb', line 80 def node_clusters @node_clusters ||= DockerCloud::NodeClusterAPI.new(headers, ApiType::INFRASTRUCTURE, self) end |
#node_types ⇒ Object
76 77 78 |
# File 'lib/docker_cloud.rb', line 76 def node_types @node_types ||= DockerCloud::NodeTypeAPI.new(headers, ApiType::INFRASTRUCTURE, self) end |
#nodes ⇒ Object
84 85 86 |
# File 'lib/docker_cloud.rb', line 84 def nodes @nodes ||= DockerCloud::NodeAPI.new(headers, ApiType::INFRASTRUCTURE, self) end |
#providers ⇒ Object
64 65 66 |
# File 'lib/docker_cloud.rb', line 64 def providers @providers ||= DockerCloud::ProviderAPI.new(headers, ApiType::INFRASTRUCTURE, self) end |
#regions ⇒ Object
68 69 70 |
# File 'lib/docker_cloud.rb', line 68 def regions @regions ||= DockerCloud::RegionAPI.new(headers, ApiType::INFRASTRUCTURE, self) end |
#registries ⇒ Object
88 89 90 |
# File 'lib/docker_cloud.rb', line 88 def registries @registries ||= DockerCloud::RegistryAPI.new(headers, ApiType::REPOSITORY, self) end |
#services ⇒ Object
101 102 103 |
# File 'lib/docker_cloud.rb', line 101 def services @services ||= DockerCloud::ServiceAPI.new(headers, ApiType::APPLICATION, self) end |
#stacks ⇒ Object
97 98 99 |
# File 'lib/docker_cloud.rb', line 97 def stacks @stacks ||= DockerCloud::StackAPI.new(headers, ApiType::APPLICATION, self) end |