package
0.0.0-20181016143655-c683906c508e
Repository: https://github.com/kentonh/gpanel.git
Documentation: pkg.go.dev
# README
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 {}
# Functions
Maintenance function is called from /api/server/maintenance and will place the public server into maintenance mode.
Restart function is called from /api/server/restart and will attempt to shutdown, either gracefully or not gracefully (contingent on request data), and then turn back on the public server.
Shutdown function is called from /api/server/shutdown and will attempt to shutdown, either gracefully or not gracefully (contingent on request data).
Start function is called from /api/server/start and turn the public server on.
Status function is called from api/server/status and will return the current status of the public server.