mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
feat: missing endpoints
This commit is contained in:
22
internal/driver/list.go
Normal file
22
internal/driver/list.go
Normal 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": "",
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user