a89aa40dda
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
16 lines
516 B
Go
16 lines
516 B
Go
package server
|
|
|
|
import "github.com/gorilla/mux"
|
|
|
|
func (s *Server) router() *mux.Router {
|
|
r := mux.NewRouter()
|
|
r.HandleFunc("/", s.genericHandler)
|
|
r.HandleFunc("/config", s.getConfig).Methods("GET")
|
|
r.HandleFunc("/config/raw", s.getConfigRaw).Methods("GET")
|
|
r.HandleFunc("/frontends", s.addFrontend).Methods("POST")
|
|
r.HandleFunc("/frontends", s.updateFrontend).Methods("PUT")
|
|
r.HandleFunc("/frontends/{name}", s.removeFrontend).Methods("DELETE")
|
|
r.HandleFunc("/reload", s.reload).Methods("POST")
|
|
|
|
return r
|
|
}
|