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.
53 54 55 56 |
# File 'lib/docker_cloud.rb', line 53 def initialize(username, api_key) @username = username @api_key = api_key end |
Instance Attribute Details
#username ⇒ Object (readonly)
Returns the value of attribute username.
43 44 45 |
# File 'lib/docker_cloud.rb', line 43 def username @username end |
Instance Method Details
#availability_zones ⇒ Object
74 75 76 |
# File 'lib/docker_cloud.rb', line 74 def availability_zones @availability_zones ||= DockerCloud::AvailabilityZoneAPI.new(headers, ApiType::INFRASTRUCTURE, self) end |
#containers ⇒ Object
107 108 109 |
# File 'lib/docker_cloud.rb', line 107 def containers @containers ||= DockerCloud::ContainerAPI.new(headers, ApiType::APPLICATION, self) end |
#events ⇒ Object
111 112 113 |
# File 'lib/docker_cloud.rb', line 111 def events @events ||= DockerCloud::EventsAPI.new(headers, ApiType::AUDIT, self) end |
#external_repositories ⇒ Object
94 95 96 97 |
# File 'lib/docker_cloud.rb', line 94 def external_repositories @repositories ||= DockerCloud::ExternalRepositoryAPI.new(headers, ApiType::REPOSITORY, self) end |
#headers ⇒ Object
58 59 60 61 62 63 64 |
# File 'lib/docker_cloud.rb', line 58 def headers { 'Authorization' => , 'Accept' => 'application/json', 'Content-Type' => 'application/json' } end |
#node_clusters ⇒ Object
82 83 84 |
# File 'lib/docker_cloud.rb', line 82 def node_clusters @node_clusters ||= DockerCloud::NodeClusterAPI.new(headers, ApiType::INFRASTRUCTURE, self) end |
#node_types ⇒ Object
78 79 80 |
# File 'lib/docker_cloud.rb', line 78 def node_types @node_types ||= DockerCloud::NodeTypeAPI.new(headers, ApiType::INFRASTRUCTURE, self) end |
#nodes ⇒ Object
86 87 88 |
# File 'lib/docker_cloud.rb', line 86 def nodes @nodes ||= DockerCloud::NodeAPI.new(headers, ApiType::INFRASTRUCTURE, self) end |
#providers ⇒ Object
66 67 68 |
# File 'lib/docker_cloud.rb', line 66 def providers @providers ||= DockerCloud::ProviderAPI.new(headers, ApiType::INFRASTRUCTURE, self) end |
#regions ⇒ Object
70 71 72 |
# File 'lib/docker_cloud.rb', line 70 def regions @regions ||= DockerCloud::RegionAPI.new(headers, ApiType::INFRASTRUCTURE, self) end |
#registries ⇒ Object
90 91 92 |
# File 'lib/docker_cloud.rb', line 90 def registries @registries ||= DockerCloud::RegistryAPI.new(headers, ApiType::REPOSITORY, self) end |
#services ⇒ Object
103 104 105 |
# File 'lib/docker_cloud.rb', line 103 def services @services ||= DockerCloud::ServiceAPI.new(headers, ApiType::APPLICATION, self) end |
#stacks ⇒ Object
99 100 101 |
# File 'lib/docker_cloud.rb', line 99 def stacks @stacks ||= DockerCloud::StackAPI.new(headers, ApiType::APPLICATION, self) end |