aboutsummaryrefslogtreecommitdiff
path: root/routes.go
diff options
context:
space:
mode:
Diffstat (limited to 'routes.go')
-rw-r--r--routes.go39
1 files changed, 39 insertions, 0 deletions
diff --git a/routes.go b/routes.go
new file mode 100644
index 0000000..830b0d0
--- /dev/null
+++ b/routes.go
@@ -0,0 +1,39 @@
+package main
+
+import "net/http"
+
+type Route struct {
+ Name string
+ Method string
+ Pattern string
+ HandlerFunc http.HandlerFunc
+}
+
+type Routes []Route
+
+var routes = Routes{
+ Route{
+ "Index",
+ "GET",
+ "/",
+ Index,
+ },
+ Route{
+ "CacheIndex",
+ "GET",
+ "/caches",
+ CacheIndex,
+ },
+ Route{
+ "CacheShow",
+ "GET",
+ "/caches/{cacheId}",
+ CacheShow,
+ },
+ Route{
+ "CacheCreate",
+ "POST",
+ "/caches",
+ CacheCreate,
+ },
+}