Golang github.com-ARGOeu-argo-web-api-respond.ConfHandler类(方法)实例源码

下面列出了Golang github.com-ARGOeu-argo-web-api-respond.ConfHandler 类(方法)源码代码实例,从而了解它的用法。

作者: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))
}


问题


面经


文章

微信
公众号

扫码关注公众号