作者:skanc
项目:argo-web-ap
// HandleSubrouter uses the subrouter for a specific calls and creates a tree of sorts
// handling each route with a different subrouter
func HandleSubrouter(s *mux.Router, confhandler *respond.ConfHandler) {
s.Methods("GET").
Path("/operations_profiles").
Name("List Operations Profiles").
Handler(confhandler.Respond(List))
s.Methods("GET").
Path("/operations_profiles/{ID}").
Name("List One Operations Profile").
Handler(confhandler.Respond(ListOne))
s.Methods("POST").
Path("/operations_profiles").
Name("Create Operations Profile").
Handler(confhandler.Respond(Create))
s.Methods("PUT").
Path("/operations_profiles/{ID}").
Name("Update Operations Profile").
Handler(confhandler.Respond(Update))
s.Methods("DELETE").
Path("/operations_profiles/{ID}").
Name("Delete Operations Profile").
Handler(confhandler.Respond(Delete))
}