예제 #1
0
파일: profiles.go 프로젝트: cedmundo/hablo
// Configure setups all resource functions in order to work with database operations
func Configure(g *echo.Group) {
	g.Use(auth.AnyAuth())
	g.Post("/", msg.JSONResource(Create))
	g.Get("/:id", msg.JSONResource(Retrieve))
	g.Patch("/:id", msg.JSONResource(Update))
	g.Delete("/:id", msg.JSONResource(Delete))
}
예제 #2
0
파일: groups.go 프로젝트: cedmundo/hablo
// Configure will set all routes needed by this module
func Configure(g *echo.Group) {
	g.Use(auth.AnyAuth())
	g.Get("/", msg.JSONResource(List))
	g.Get("/:gid", msg.JSONResource(Create))
	g.Post("/:gid", msg.JSONResource(Retrieve))
	g.Patch("/:gid", msg.JSONResource(Update))
	g.Delete("/:gid", msg.JSONResource(Delete))

	g.Post("/:gid/members/:mid", msg.JSONResource(AddMember))
	g.Post("/:gid/members/:mid/admin", msg.JSONResource(AddAdmin))
	g.Delete("/:gid/members/:mid/admin", msg.JSONResource(DelAdmin))
	g.Delete("/:gid/members/:mid", msg.JSONResource(DelMember))
}
예제 #3
0
파일: sessions.go 프로젝트: cedmundo/hablo
// Configure setups all resource functions in order to work with database operations
func Configure(g *echo.Group) {
	g.Use(auth.AnyAuth())
	g.Post("/", msg.JSONResource(ExchageDigits))
	g.Delete("/:id", msg.JSONResource(CloseSession))
}
예제 #4
0
// ConfigureHTTPGroup setups the websocket listener
func ConfigureHTTPGroup(g *echo.Group) {
	g.Use(auth.AnyAuth())
	g.WebSocket("", msg.JSONResource(AcceptClient))
}