func init() { //Get All Projects (Admin Only), All My Projects for others router.Register("/rest/project", router.GET, nil, nil, getAllProjects) //Get Project (TODO Permission if only if the user has access or is admin) router.Register("/rest/project/{project_id}", router.GET, nil, nil, getProject) //Update Project (TODO Permission if only if the user has access or is admin) router.Register("/rest/project", router.POST, []string{"application/json"}, nil, updateProject) }
func init() { //Get All Users (Admin Only) router.Register("/rest/user/", router.GET, nil, nil, getUsers) //Register User router.Register("/rest/user/", router.PUT, []string{"application/json"}, nil, registerUser) //Get One User (Admin Only) //router.Register("/rest/user/{user_id}/", router.GET, nil, nil, getUser) //Update User (Admin Only) //router.Register("/rest/user/", router.PUT, []string{"application/json"}, nil, updateUser) // Get Me --TODO // Change Password --TODO }
func init() { router.Register("/rest/subscription/{project_id}", router.GET, nil, nil, getSubscriptions) router.Register("/rest/subscription/{project_id}/{subscription_id}", router.GET, nil, nil, getSubscription) router.Register("/rest/subscription/{project_id}", router.POST, []string{"application/json"}, nil, postSubscription) }
func init() { router.Register("/rest/internal/check/{project_id}", router.POST, nil, nil, checkProject) }
func init() { router.Register("/rest/alert/{project_id}", router.GET, nil, nil, getAlerts) router.Register("/rest/alert/{project_id}/{alert_id}", router.GET, nil, nil, getAlert) router.Register("/rest/alert/{project_id}", router.POST, []string{"application/json"}, nil, postAlert) }
func init() { router.Register("/rest/internal/tick/", router.GET, nil, nil, getTick) }