aboutsummaryrefslogtreecommitdiff
path: root/routes.go
blob: 830b0d0f4b67b01ce130f4c1d8276ca1f9e2759f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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,
	},
}