API for environments

Environments for functions. For now this is just the image URL for the
function run container. In the future, Environments will also have
build container image URLs, and perhaps parameters to those
containers.

Create/read/update/delete/list. Versioning will be added later. For
now, only the latest update is stored.
This commit is contained in:
Soam Vasani
2016-09-21 22:29:51 -07:00
parent 80e73f7f09
commit 6b67bc0a61
6 changed files with 324 additions and 27 deletions
+2 -2
View File
@@ -62,7 +62,7 @@ func (api *API) HTTPTriggerApiCreate(w http.ResponseWriter, r *http.Request) {
return
}
m := &fission.Metadata{Name: t.Name, Uid: uid}
m := &fission.Metadata{Name: t.Metadata.Name, Uid: uid}
resp, err := json.Marshal(m)
if err != nil {
api.respondWithError(w, err)
@@ -122,7 +122,7 @@ func (api *API) HTTPTriggerApiUpdate(w http.ResponseWriter, r *http.Request) {
return
}
m := &fission.Metadata{Name: t.Name, Uid: uid}
m := &fission.Metadata{Name: t.Metadata.Name, Uid: uid}
resp, err := json.Marshal(m)
if err != nil {
api.respondWithError(w, err)