func adminId(w http.ResponseWriter, r *http.Request, c *webc.Context) { c.CheckAuth(w, r, "admin", "/") fmt.Fprintf(w, "user id: %v", c.GetPathVar("id")) }
func admin(w http.ResponseWriter, r *http.Request, c *webc.Context) { c.CheckAuth(w, r, "admin", "/") fmt.Fprintf(w, "page: user, addr: %s, user-agent: %s", r.RemoteAddr, r.UserAgent()) return }
func adminAdd(w http.ResponseWriter, r *http.Request, c *webc.Context) { c.CheckAuth(w, r, "admin", "/") fmt.Fprintf(w, "User Add Page") }
func protected(w http.ResponseWriter, r *http.Request, c *webc.Context) { slug := c.GetPathVar("slug") c.CheckAuth(w, r, "driver", "/"+slug) fmt.Fprintf(w, "You are authorized to view page %s", slug) }