refactor: initial commit for major rewrite

This commit is contained in:
David Allen 2025-08-03 20:25:18 -06:00
parent 3253cb8bbb
commit bfd83f35a3
Signed by: towk
GPG key ID: 0430CDBE22619155
45 changed files with 439 additions and 1733 deletions

38
pkg/service/routes.go Normal file
View file

@ -0,0 +1,38 @@
package service
import (
"encoding/json"
"fmt"
"net/http"
)
func (s *Service) Download() http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
}
}
func (s *Service) Upload() http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
}
}
func (s *Service) List() http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
}
}
func (s *Service) GetStatus(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
data := map[string]any{
"code": 200,
"message": "Configurator is healthy",
}
err := json.NewEncoder(w).Encode(data)
if err != nil {
fmt.Printf("failed to encode JSON: %v\n", err)
return
}
}