// 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)) }
// 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)) }
// 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)) }
// ConfigureHTTPGroup setups the websocket listener func ConfigureHTTPGroup(g *echo.Group) { g.Use(auth.AnyAuth()) g.WebSocket("", msg.JSONResource(AcceptClient)) }