15 lines
286 B
Go
15 lines
286 B
Go
package handlers
|
|
|
|
import (
|
|
"encoding/json"
|
|
"net/http"
|
|
)
|
|
|
|
func NamespacesHandler(w http.ResponseWriter, r *http.Request) {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
|
|
namespaces := []string{"default", "kube-system", "kube-public"}
|
|
|
|
json.NewEncoder(w).Encode(namespaces)
|
|
}
|