func SetupKeysRoutes(e *echo.Echo) { e.Get("", listKeys) e.Get("/:id", showKey) e.Post("", createKey) e.Put("/:id", updateKey) e.Delete("/:id", deleteKey) }
func (s *yovpnServer) setupHandlers(e *echo.Echo) { e.Get("/", s.blank) e.Get("/cleanup", s.cleanup) e.Put("/endpoint", s.createEndpoint) e.Get("/endpoint/:id", s.getEndpoint) e.Delete("/endpoint/:id", s.deleteEndpoint) e.Get("/regions", s.getRegions) }
func Route(e *echo.Echo, a *AppContext) { //Quotes e.Post("/quotes", a.NewQuote) e.Get("/quotes", a.GetQuotes) e.Get("/quotes/:id", a.FindOneQuote) e.Put("/quotes/:id", a.EditQuote) e.Delete("/quotes/:id", a.DeleteQuote) //Slack specific api calls, uses incoming x-www-form-urlencoded post data instead of json e.Post("/slack/insertQuote", a.NewQuote) e.Get("/slack/searchQuote", a.SearchQuote) //Activity feed e.Post("/activities", a.NewActivity) e.Get("/activities", a.GetActivities) e.Get("/activities/:id", a.FindOneActivity) e.Delete("/activities/:id", a.DeleteActivity) //Debug e.Get("/debug", a.SendQuote) }