feat: missing endpoints

This commit is contained in:
Nicolas Meienberger
2025-08-09 18:30:33 +02:00
parent 065c629ba8
commit 388114d536
4 changed files with 67 additions and 1 deletions

22
internal/driver/list.go Normal file
View File

@@ -0,0 +1,22 @@
package driver
import (
"encoding/json"
"log"
"net/http"
)
func List(w http.ResponseWriter, r *http.Request) {
log.Printf("Received list request: %s", r.URL.Path)
var vols []map[string]string
for _, v := range volumes {
vols = append(vols, map[string]string{
"Name": v.Name,
})
}
json.NewEncoder(w).Encode(map[string]interface{}{
"Volumes": vols,
"Err": "",
})
}