gPanel/pkg/api/server
2017-11-25 15:30:16 -06:00
..
maintenance.go issue #63 2017-11-13 16:10:02 -06:00
README.md issue #63 2017-11-13 16:10:02 -06:00
restart.go issue #63 2017-11-13 16:10:02 -06:00
shutdown.go issue #63 2017-11-13 16:10:02 -06:00
start.go issue #63 2017-11-13 16:10:02 -06:00
status.go account management from server panel has been set up in general, APIs just need to be configured on the front end side. Status API is already set up to make sure it works. 2017-11-25 15:30:16 -06:00

Server API Documentation

/*
Relative API Path:
  api/server/status
Request:
  N/A
Response(200, 405):
  "0" - OFF,
  "1" - ON,
  "2" - "MAINTENANCE",
  "3" - "RESTARTING"
*/
func Status(res http.ResponseWriter, req *http.Request) bool {}

/*
Relative API Path:
  api/server/start
Request:
  N/A
Response(204, 405, 409):
  N/A
*/
func Start(res http.ResponseWriter, req *http.Request) bool {}

/*
Relative API Path:
  api/server/shutdown
Request:
  {
    "graceful": boolean
  }
Response(204, 404, 405):
  N/A
*/
func Shutdown(res http.ResponseWriter, req *http.Request) bool {}

/*
Relative API Path:
  api/server/restart
Request:
  {
    "graceful": boolean
  }
Response(204, 404, 405):
  N/A
*/
func Restart(res http.ResponseWriter, req *http.Request) bool {}

/*
Relative API Path:
  api/server/maintenance
Request:
  N/A
Response(204, 405):
  N/A
*/
func Maintenance(res http.ResponseWriter, req *http.Request) bool {}