func NewRouter(lgc *logic.Logic) *httprouter.Router {
	router := httprouter.New()

	router.GET("/api/roles/:rolename", wrapHandle(lgc, HandleGetRole))
	router.PUT("/api/roles/:rolename", wrapHandle(lgc, HandleUpdateRole))
	router.DELETE("/api/roles/:rolename", wrapHandle(lgc, HandleDeleteRole))
	router.GET("/api/roles", wrapHandle(lgc, HandleGetRoles))
	router.POST("/api/roles", wrapHandle(lgc, HandleCreateRole))

	router.GET("/api/users/:username", wrapHandle(lgc, HandleGetUser))
	router.PUT("/api/users/:username", wrapHandle(lgc, HandleUpdateUser))
	router.DELETE("/api/users/:username", wrapHandle(lgc, HandleDeleteUser))
	router.GET("/api/users", wrapHandle(lgc, HandleGetUsers))
	router.POST("/api/users", wrapHandle(lgc, HandleCreateUser))

	router.GET("/api/roles/:rolename/members", wrapHandle(lgc, HandleRoleMembers))
	router.PUT("/api/roles/:rolename/members/:username", wrapHandle(lgc, HandleAddUserToRole))
	router.DELETE(
		"/api/roles/:rolename/members/:username", wrapHandle(lgc, HandleRemoveUserFromRole))

	router.GET("/api/system/inputs", wrapHandle(lgc, HandleGetInputs))
	router.GET("/api/system/inputs/:inputID", wrapHandle(lgc, HandleGetInput))
	router.POST("/api/system/inputs", wrapHandle(lgc, HandleCreateInput))
	router.PUT("/api/system/inputs/:inputID", wrapHandle(lgc, HandleUpdateInput))
	router.DELETE("/api/system/inputs/:inputID", wrapHandle(lgc, HandleDeleteInput))

	router.GET("/api/system/indices/index_sets", wrapHandle(lgc, HandleGetIndexSets))
	router.GET(
		"/api/system/indices/index_sets/:indexSetID", wrapHandle(lgc, HandleGetIndexSet))
	router.POST("/api/system/indices/index_sets", wrapHandle(lgc, HandleCreateIndexSet))
	router.PUT(
		"/api/system/indices/index_sets/:indexSetID", wrapHandle(lgc, HandleUpdateIndexSet))
	router.DELETE(
		"/api/system/indices/index_sets/:indexSetID", wrapHandle(lgc, HandleDeleteIndexSet))
	router.PUT(
		"/api/system/indices/index_sets/:indexSetID/default",
		wrapHandle(lgc, HandleSetDefaultIndexSet))

	router.GET(
		"/api/system/indices/index_sets/:indexSetID/stats",
		wrapHandle(lgc, HandleGetIndexSetStats))

	router.GET("/api/streams", wrapHandle(lgc, HandleGetStreams))
	router.POST("/api/streams", wrapHandle(lgc, HandleCreateStream))
	router.GET("/api/streams/:streamID", wrapHandle(lgc, HandleGetStream))
	router.PUT("/api/streams/:streamID", wrapHandle(lgc, HandleUpdateStream))
	router.DELETE("/api/streams/:streamID", wrapHandle(lgc, HandleDeleteStream))
	router.POST("/api/streams/:streamID/pause", wrapHandle(lgc, HandlePauseStream))
	router.POST("/api/streams/:streamID/resume", wrapHandle(lgc, HandleResumeStream))

	router.GET("/api/streams/:streamID/rules", wrapHandle(lgc, HandleGetStreamRules))
	router.POST("/api/streams/:streamID/rules", wrapHandle(lgc, HandleCreateStreamRule))
	router.PUT("/api/streams/:streamID/rules/:streamRuleID", wrapHandle(lgc, HandleUpdateStreamRule))
	router.DELETE("/api/streams/:streamID/rules/:streamRuleID", wrapHandle(lgc, HandleDeleteStreamRule))
	router.GET("/api/streams/:streamID/rules/:streamRuleID", wrapHandle(lgc, HandleGetStreamRule))

	router.GET("/api/alerts/conditions", wrapHandle(lgc, HandleGetAlertConditions))

	router.NotFound = HandleNotFound(lgc)
	return router
}
// NewRouter returns a new HTTP router.
NewRouter returns a new HTTP router.
// NewRouter returns a new HTTP router .
func NewRouter(lgc *logic.Logic) *httprouter.Router {
	router := httprouter.New()
	router.GET("/api/roles/:rolename", wrapHandle(lgc, HandleGetRole))
	router.PUT("/api/roles/:rolename", wrapHandle(lgc, HandleUpdateRole))
	router.DELETE("/api/roles/:rolename", wrapHandle(lgc, HandleDeleteRole))
	router.GET("/api/roles", wrapHandle(lgc, HandleGetRoles))
	router.POST("/api/roles", wrapHandle(lgc, HandleCreateRole))
	router.GET("/api/users/:username", wrapHandle(lgc, HandleGetUser))
	router.PUT("/api/users/:username", wrapHandle(lgc, HandleUpdateUser))
	router.DELETE("/api/users/:username", wrapHandle(lgc, HandleDeleteUser))
	router.GET("/api/users", wrapHandle(lgc, HandleGetUsers))
	router.POST("/api/users", wrapHandle(lgc, HandleCreateUser))
	router.GET("/api/roles/:rolename/members", wrapHandle(lgc, HandleRoleMembers))
	router.PUT("/api/roles/:rolename/members/:username", wrapHandle(lgc, HandleAddUserToRole))
	router.DELETE(
		"/api/roles/:rolename/members/:username", wrapHandle(lgc, HandleRemoveUserFromRole))
	router.GET("/api/system/inputs", wrapHandle(lgc, HandleGetInputs))
	router.GET("/api/system/inputs/:inputID", wrapHandle(lgc, HandleGetInput))
	router.POST("/api/system/inputs", wrapHandle(lgc, HandleCreateInput))
	router.PUT("/api/system/inputs/:inputID", wrapHandle(lgc, HandleUpdateInput))
	router.DELETE("/api/system/inputs/:inputID", wrapHandle(lgc, HandleDeleteInput))
	router.GET("/api/system/indices/index_sets", wrapHandle(lgc, HandleGetIndexSets))
	router.GET(
		"/api/system/indices/index_sets/:indexSetID", wrapHandle(lgc, HandleGetIndexSet))
	router.POST("/api/system/indices/index_sets", wrapHandle(lgc, HandleCreateIndexSet))
	router.PUT(
		"/api/system/indices/index_sets/:indexSetID", wrapHandle(lgc, HandleUpdateIndexSet))
	router.DELETE(
		"/api/system/indices/index_sets/:indexSetID", wrapHandle(lgc, HandleDeleteIndexSet))
	router.PUT(
		"/api/system/indices/index_sets/:indexSetID/default",
		wrapHandle(lgc, HandleSetDefaultIndexSet))
	router.GET(
		"/api/system/indices/index_sets/:indexSetID/stats",
		wrapHandle(lgc, HandleGetIndexSetStats))
	router.GET("/api/streams", wrapHandle(lgc, HandleGetStreams))
	router.POST("/api/streams", wrapHandle(lgc, HandleCreateStream))
	router.GET("/api/streams/:streamID", wrapHandle(lgc, HandleGetStream))
	router.PUT("/api/streams/:streamID", wrapHandle(lgc, HandleUpdateStream))
	router.DELETE("/api/streams/:streamID", wrapHandle(lgc, HandleDeleteStream))
	router.POST("/api/streams/:streamID/pause", wrapHandle(lgc, HandlePauseStream))
	router.POST("/api/streams/:streamID/resume", wrapHandle(lgc, HandleResumeStream))
	router.GET("/api/streams/:streamID/rules", wrapHandle(lgc, HandleGetStreamRules))
	router.POST("/api/streams/:streamID/rules", wrapHandle(lgc, HandleCreateStreamRule))
	router.PUT("/api/streams/:streamID/rules/:streamRuleID", wrapHandle(lgc, HandleUpdateStreamRule))
	router.DELETE("/api/streams/:streamID/rules/:streamRuleID", wrapHandle(lgc, HandleDeleteStreamRule))
	router.GET("/api/streams/:streamID/rules/:streamRuleID", wrapHandle(lgc, HandleGetStreamRule))
	router.GET("/api/alerts/conditions", wrapHandle(lgc, HandleGetAlertConditions))
	router.NotFound = HandleNotFound(lgc)
	return router
}
func NewRouter ( lgc * logic . Logic ) * httprouter . Router { router := httprouter . New ( ) router . GET ( " " , wrapHandle ( lgc , HandleGetRole ) ) router . PUT ( " " , wrapHandle ( lgc , HandleUpdateRole ) ) router . DELETE ( " " , wrapHandle ( lgc , HandleDeleteRole ) ) router . GET ( " " , wrapHandle ( lgc , HandleGetRoles ) ) router . POST ( " " , wrapHandle ( lgc , HandleCreateRole ) ) router . GET ( " " , wrapHandle ( lgc , HandleGetUser ) ) router . PUT ( " " , wrapHandle ( lgc , HandleUpdateUser ) ) router . DELETE ( " " , wrapHandle ( lgc , HandleDeleteUser ) ) router . GET ( " " , wrapHandle ( lgc , HandleGetUsers ) ) router . POST ( " " , wrapHandle ( lgc , HandleCreateUser ) ) router . GET ( " " , wrapHandle ( lgc , HandleRoleMembers ) ) router . PUT ( " " , wrapHandle ( lgc , HandleAddUserToRole ) ) router . DELETE ( " " , wrapHandle ( lgc , HandleRemoveUserFromRole ) ) router . GET ( " " , wrapHandle ( lgc , HandleGetInputs ) ) router . GET ( " " , wrapHandle ( lgc , HandleGetInput ) ) router . POST ( " " , wrapHandle ( lgc , HandleCreateInput ) ) router . PUT ( " " , wrapHandle ( lgc , HandleUpdateInput ) ) router . DELETE ( " " , wrapHandle ( lgc , HandleDeleteInput ) ) router . GET ( " " , wrapHandle ( lgc , HandleGetIndexSets ) ) router . GET ( " " , wrapHandle ( lgc , HandleGetIndexSet ) ) router . POST ( " " , wrapHandle ( lgc , HandleCreateIndexSet ) ) router . PUT ( " " , wrapHandle ( lgc , HandleUpdateIndexSet ) ) router . DELETE ( " " , wrapHandle ( lgc , HandleDeleteIndexSet ) ) router . PUT ( " " , wrapHandle ( lgc , HandleSetDefaultIndexSet ) ) router . GET ( " " , wrapHandle ( lgc , HandleGetIndexSetStats ) ) router . GET ( " " , wrapHandle ( lgc , HandleGetStreams ) ) router . POST ( " " , wrapHandle ( lgc , HandleCreateStream ) ) router . GET ( " " , wrapHandle ( lgc , HandleGetStream ) ) router . PUT ( " " , wrapHandle ( lgc , HandleUpdateStream ) ) router . DELETE ( " " , wrapHandle ( lgc , HandleDeleteStream ) ) router . POST ( " " , wrapHandle ( lgc , HandlePauseStream ) ) router . POST ( " " , wrapHandle ( lgc , HandleResumeStream ) ) router . GET ( " " , wrapHandle ( lgc , HandleGetStreamRules ) ) router . POST ( " " , wrapHandle ( lgc , HandleCreateStreamRule ) ) router . PUT ( " " , wrapHandle ( lgc , HandleUpdateStreamRule ) ) router . DELETE ( " " , wrapHandle ( lgc , HandleDeleteStreamRule ) ) router . GET ( " " , wrapHandle ( lgc , HandleGetStreamRule ) ) router . GET ( " " , wrapHandle ( lgc , HandleGetAlertConditions ) ) router . NotFound = HandleNotFound ( lgc ) return router }
NewRouter returns a new HTTP router.
NewRouter returns a new HTTP router .