From a50da4215c88efcdcab1da2835459b64a5b341b4 Mon Sep 17 00:00:00 2001 From: Nathan Lasseter Date: Tue, 22 Sep 2015 17:22:43 +0100 Subject: Initial Commit --- routes.go | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 routes.go (limited to 'routes.go') 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, + }, +} -- cgit v1.2.1