aboutsummaryrefslogtreecommitdiff
path: root/routes.go
diff options
context:
space:
mode:
authorNathan Lasseter <Nathan Lasseter nathan@bytemark.co.uk>2015-09-22 17:22:43 +0100
committerNathan Lasseter <Nathan Lasseter nathan@bytemark.co.uk>2015-09-22 17:22:43 +0100
commita50da4215c88efcdcab1da2835459b64a5b341b4 (patch)
treed99f45ab6416906ac0954e0d3b8f90b860264cbd /routes.go
Initial Commit
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,
+ },
+}