First import

This commit is contained in:
claudemiro
2015-01-02 18:20:27 -03:00
commit e1b7bd8252
20 changed files with 1869 additions and 0 deletions
+57
View File
@@ -0,0 +1,57 @@
// Copyright 2014 Claudemiro Alves Feitosa Neto. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package main
import (
"net/http"
)
type Route struct {
Name string
Method string
Pattern string
HandlerFunc http.HandlerFunc
RequiresRestAuth bool
}
type Routes []Route
var routes = Routes{
Route{
"PostEvents",
"POST",
"/apps/{app_id}/events",
PostEvents,
true,
},
Route{
"GetChannels",
"GET",
"/apps/{app_id}/channels",
GetChannels,
true,
},
Route{
"GetChannel",
"GET",
"/apps/{app_id}/channels/{channel_name}",
GetChannel,
true,
},
Route{
"GetChannelUsers",
"GET",
"/apps/{app_id}/channels/{channel_name}/users",
GetChannelUsers,
true,
},
Route{
"Websocket",
"GET",
"/app/{key}",
Websocket,
false,
},
}