dotcloud/docker — pull request #1524 by jonasi (2013-08-13 19:40:06+00:00)
Title: splitting out client functionality

This is a first pass at splitting out the remote API client into a separate sub package.

The main idea was to separate the contents of `command.go` into separate pieces
- interface for the `docker` cli (stayed in `commands.go`)
- transport/remote api interface (new package `client`)

However that work produced a fair amount of side effects elsewhere in the codebase. I made some decisions so that I could get the functionality working, but am happy to back out of any of the changes where possible:
- new package `api` which holds version info and shared data structures (`api_params.go` -> `api/types.go`)
- there were a few shared types not under `api_params` that I moved to `api/types.go` (e.g. `Container`, `Config`)
- moved `Archive` under `utils` so that it could be shared by subpackages

The big remaining issue is tests. Everything passes now but I did not introduce any tests for the `client` package. Not clear how to pull in the runtime for that without a circular dependency. Maybe the testing runtime could be it's own package?