mirror of
https://github.com/bytedream/docker4ssh.git
synced 2025-12-12 20:42:07 +01:00
Initial commit
This commit is contained in:
15
server/api/ping.go
Normal file
15
server/api/ping.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"docker4ssh/ssh"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
type pingGetResponse struct {
|
||||
Received int64 `json:"received"`
|
||||
}
|
||||
|
||||
func PingGet(w http.ResponseWriter, r *http.Request, user *ssh.User) (interface{}, int) {
|
||||
return pingGetResponse{Received: time.Now().UnixNano()}, http.StatusOK
|
||||
}
|
||||
Reference in New Issue
Block a user