package routes import ( "byom-infra-api/middleware" "github.com/gorilla/mux" ) // SetupRoutes configures all the routes for the application func SetupRoutes(r *mux.Router) { // Add logging middleware r.Use(middleware.LoggingMiddleware) // SSH Key routes r.HandleFunc("/sshkey", GetSSHKeys).Methods("GET") r.HandleFunc("/sshkey/{id}", GetSSHKeyByID).Methods("GET") r.HandleFunc("/sshkey", CreateSSHKey).Methods("POST") r.HandleFunc("/sshkey/{id}", DeleteSSHKey).Methods("DELETE") // DNS routes r.HandleFunc("/dns", ListDNSRecords).Methods("GET") r.HandleFunc("/dns/{subdomain}", GetDNSRecordID).Methods("GET") r.HandleFunc("/dns", CreateDNSRecord).Methods("POST") r.HandleFunc("/dns/{id}", DeleteDNSRecord).Methods("DELETE") }