first commit. working templating, path routing, api responses, web menagment path

This commit is contained in:
2025-10-12 07:05:03 +00:00
commit ebc79583e4
12 changed files with 203 additions and 0 deletions

31
web/manager/manager.go Normal file
View File

@ -0,0 +1,31 @@
package manager
// package for the web menagment of the api paths
import (
"api_manager/web/api"
"api_manager/web/render"
"fmt"
"net/http"
)
func Add_api(w http.ResponseWriter, req *http.Request) {
// api.Apis["second"] = "/api/sec"
fmt.Fprintf(w, "good")
}
func Show_apis(w http.ResponseWriter, req *http.Request) {
apis := api.Apis()
eval := "<div>"
for tag, varr := range apis {
eval_group := ""
eval_group += fmt.Sprintf("%v", varr)
eval_group += "-"
eval_group += tag
eval_group += "<br>"
eval += render.Template_of_tag(eval_group, "text")
}
eval += "</div>"
fmt.Fprint(w, render.Template_with_string(eval))
}