mirror of
https://github.com/donl/gPanel.git
synced 2026-05-29 06:12:29 -06:00
server api init and fixing user api readme
This commit is contained in:
parent
96a291c1fb
commit
298367fb75
8 changed files with 98 additions and 3 deletions
53
pkg/api/server/README.md
Normal file
53
pkg/api/server/README.md
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
# Server API Documentation
|
||||
|
||||
```go
|
||||
/*
|
||||
Relative API Path:
|
||||
api/server/status
|
||||
Request:
|
||||
N/A
|
||||
Response():
|
||||
N/A
|
||||
*/
|
||||
func Status(res http.ResponseWriter, req *http.Request) bool
|
||||
|
||||
/*
|
||||
Relative API Path:
|
||||
api/server/start
|
||||
Request:
|
||||
N/A
|
||||
Response():
|
||||
N/A
|
||||
*/
|
||||
func Start(res http.ResponseWriter, req *http.Request) bool
|
||||
|
||||
/*
|
||||
Relative API Path:
|
||||
api/server/Shutdown
|
||||
Request:
|
||||
N/A
|
||||
Response():
|
||||
N/A
|
||||
*/
|
||||
func Shutdown(res http.ResponseWriter, req *http.Request) bool
|
||||
|
||||
/*
|
||||
Relative API Path:
|
||||
api/server/Restart
|
||||
Request:
|
||||
N/A
|
||||
Response():
|
||||
N/A
|
||||
*/
|
||||
func Restart(res http.ResponseWriter, req *http.Request) bool
|
||||
|
||||
/*
|
||||
Relative API Path:
|
||||
api/server/maintenance
|
||||
Request:
|
||||
N/A
|
||||
Response():
|
||||
N/A
|
||||
*/
|
||||
func Maintenance(res http.ResponseWriter, req *http.Request) bool
|
||||
```
|
||||
8
pkg/api/server/maintenance.go
Normal file
8
pkg/api/server/maintenance.go
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
// Package server is a child of package api to handle api calls concerning the server
|
||||
package server
|
||||
|
||||
import "net/http"
|
||||
|
||||
func Maintenance(res http.ResponseWriter, req *http.Request) bool {
|
||||
return true
|
||||
}
|
||||
8
pkg/api/server/restart.go
Normal file
8
pkg/api/server/restart.go
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
// Package server is a child of package api to handle api calls concerning the server
|
||||
package server
|
||||
|
||||
import "net/http"
|
||||
|
||||
func Restart(res http.ResponseWriter, req *http.Request) bool {
|
||||
return true
|
||||
}
|
||||
2
pkg/api/server/server.go
Normal file
2
pkg/api/server/server.go
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
// Package server is a child of package api to handle api calls concerning the server
|
||||
package server
|
||||
8
pkg/api/server/shutdown.go
Normal file
8
pkg/api/server/shutdown.go
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
// Package server is a child of package api to handle api calls concerning the server
|
||||
package server
|
||||
|
||||
import "net/http"
|
||||
|
||||
func Shutdown(res http.ResponseWriter, req *http.Request) bool {
|
||||
return true
|
||||
}
|
||||
8
pkg/api/server/start.go
Normal file
8
pkg/api/server/start.go
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
// Package server is a child of package api to handle api calls concerning the server
|
||||
package server
|
||||
|
||||
import "net/http"
|
||||
|
||||
func Start(res http.ResponseWriter, req *http.Request) bool {
|
||||
return true
|
||||
}
|
||||
8
pkg/api/server/status.go
Normal file
8
pkg/api/server/status.go
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
// Package server is a child of package api to handle api calls concerning the server
|
||||
package server
|
||||
|
||||
import "net/http"
|
||||
|
||||
func Status(res http.ResponseWriter, req *http.Request) bool {
|
||||
return true
|
||||
}
|
||||
|
|
@ -12,7 +12,7 @@ Request:
|
|||
Response(204, 400, 401, 405, 500):
|
||||
N/A
|
||||
*/
|
||||
func UserAuthentication(res http.ResponseWriter, req *http.Request) bool
|
||||
func Auth(res http.ResponseWriter, req *http.Request) bool
|
||||
|
||||
/*
|
||||
Relative API Path:
|
||||
|
|
@ -25,7 +25,7 @@ Request:
|
|||
Response (204, 400, 405, 500):
|
||||
N/A
|
||||
*/
|
||||
func UserRegistration(res http.ResponseWriter, req *http.Request) bool
|
||||
func Register(res http.ResponseWriter, req *http.Request) bool
|
||||
|
||||
/*
|
||||
Relative API Path:
|
||||
|
|
@ -35,5 +35,5 @@ Request:
|
|||
Response (204, 405, 500):
|
||||
N/A
|
||||
*/
|
||||
func UserLogout(res http.ResponseWriter, req *http.Request) bool
|
||||
func Logout(res http.ResponseWriter, req *http.Request) bool
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue