Add initial project files

This commit is contained in:
luskbyte
2026-04-24 15:36:53 -03:00
parent f1d8fefc5a
commit f618d107ed
13 changed files with 1937 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
package handlers
import (
"docker-manager/docker"
"encoding/json"
"net/http"
)
func InfoHandler(w http.ResponseWriter, r *http.Request, client *docker.Client) {
var info map[string]interface{}
if err := client.GetJSON("/info", &info); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(info)
}