compose/cli/cmd
Djordje Lukic 11339761ca Change the way a context is stored
Initially we stored the context data in the `Metadata` of the context
but in hindsight this data would be better of in the `Endpoints` because
that's what it is used for.

Before:
```json
{
  "Name": "aci",
  "Metadata": {
    "Type": "aci",
    "Data": {
      "key": "value"
    }
  },
  "Endpoints": {
      "docker": {}
  }
}
```

After:
```json
{
  "Name": "aci",
  "Type": "aci",
  "Metadata": {},
  "Endpoints": {
      "aci": {
          "key": "value"
      },
      "docker": {}
  }
}
```

With this change the contexts that we create are more in line with the contexts the docker cli creates.

It also makes the code less complicated since we don't need to marsal twice any more. The API is nicer too:

```go
// Get a context:
c, err := store.Get(contextName)

// Get the stored endpoint:
var aciContext store.AciContext
if err := contextStore.GetEndpoint(currentContext, &aciContext); err != nil {
	return nil, err
}
```
2020-05-22 16:32:43 +02:00
..
compose Add licenses 2020-05-15 09:14:52 +02:00
context Change the way a context is stored 2020-05-22 16:32:43 +02:00
run Unit test run help 2020-05-21 20:03:06 +02:00
testdata Add default context to the context ls output 2020-05-20 18:39:10 +02:00
exec.go Refactor on services 2020-05-05 15:37:12 +02:00
logs.go Refactor on services 2020-05-05 15:37:12 +02:00
ps.go Add default context to the context ls output 2020-05-20 18:39:10 +02:00
ps_test.go Add a CliSuite for cli unit tests 2020-05-22 10:13:56 +02:00
rm.go Commands run and rm only call a func 2020-05-15 09:14:51 +02:00
serve.go Change the way a context is stored 2020-05-22 16:32:43 +02:00