1
0
mirror of https://github.com/bingohuang/docker-labs.git synced 2025-10-04 17:33:21 +08:00

Added API endpoint to get available instance images

This commit is contained in:
Michael Irwin
2017-04-11 16:57:29 -04:00
parent 8b00e7d132
commit 38c97cf100
3 changed files with 27 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
package handlers
import (
"encoding/json"
"net/http"
"github.com/franela/play-with-docker/services"
)
func GetInstanceImages(rw http.ResponseWriter, req *http.Request) {
instanceImages := services.InstanceImages()
json.NewEncoder(rw).Encode(instanceImages)
}