@@ 269-283 (lines=15) @@ | ||
266 | * |
|
267 | * @return \Psr\Http\Message\ResponseInterface |
|
268 | */ |
|
269 | public function resize($id, $parameters = [], $fetch = self::FETCH_OBJECT) |
|
270 | { |
|
271 | $queryParam = new QueryParam(); |
|
272 | $queryParam->setDefault('h', null); |
|
273 | $queryParam->setDefault('w', null); |
|
274 | $url = '/containers/{id}/resize'; |
|
275 | $url = str_replace('{id}', $id, $url); |
|
276 | $url = $url . ('?' . $queryParam->buildQueryString($parameters)); |
|
277 | $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); |
|
278 | $body = $queryParam->buildFormDataString($parameters); |
|
279 | $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); |
|
280 | $response = $this->httpClient->sendRequest($request); |
|
281 | ||
282 | return $response; |
|
283 | } |
|
284 | ||
285 | /** |
|
286 | * Start the container id. |
|
@@ 563-577 (lines=15) @@ | ||
560 | * |
|
561 | * @return \Psr\Http\Message\ResponseInterface |
|
562 | */ |
|
563 | public function remove($id, $parameters = [], $fetch = self::FETCH_OBJECT) |
|
564 | { |
|
565 | $queryParam = new QueryParam(); |
|
566 | $queryParam->setDefault('v', null); |
|
567 | $queryParam->setDefault('force', null); |
|
568 | $url = '/containers/{id}'; |
|
569 | $url = str_replace('{id}', $id, $url); |
|
570 | $url = $url . ('?' . $queryParam->buildQueryString($parameters)); |
|
571 | $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); |
|
572 | $body = $queryParam->buildFormDataString($parameters); |
|
573 | $request = $this->messageFactory->createRequest('DELETE', $url, $headers, $body); |
|
574 | $response = $this->httpClient->sendRequest($request); |
|
575 | ||
576 | return $response; |
|
577 | } |
|
578 | ||
579 | /** |
|
580 | * Get an tar archive of a resource in the filesystem of container id. |
@@ 201-216 (lines=16) @@ | ||
198 | * |
|
199 | * @return \Psr\Http\Message\ResponseInterface |
|
200 | */ |
|
201 | public function push($name, $parameters = [], $fetch = self::FETCH_OBJECT) |
|
202 | { |
|
203 | $queryParam = new QueryParam(); |
|
204 | $queryParam->setDefault('tag', null); |
|
205 | $queryParam->setRequired('X-Registry-Auth'); |
|
206 | $queryParam->setHeaderParameters(['X-Registry-Auth']); |
|
207 | $url = '/images/{name}/push'; |
|
208 | $url = str_replace('{name}', $name, $url); |
|
209 | $url = $url . ('?' . $queryParam->buildQueryString($parameters)); |
|
210 | $headers = array_merge(['Host' => 'localhost'], $queryParam->buildHeaders($parameters)); |
|
211 | $body = $queryParam->buildFormDataString($parameters); |
|
212 | $request = $this->messageFactory->createRequest('POST', $url, $headers, $body); |
|
213 | $response = $this->httpClient->sendRequest($request); |
|
214 | ||
215 | return $response; |
|
216 | } |
|
217 | ||
218 | /** |
|
219 | * Tag the image name into a repository. |