Initial commit

This commit is contained in:
2021-12-19 17:30:51 +01:00
commit a589014106
65 changed files with 7437 additions and 0 deletions

16
server/api/info.go Normal file
View File

@ -0,0 +1,16 @@
package api
import (
"docker4ssh/ssh"
"net/http"
)
type infoGetResponse struct {
ContainerID string `json:"container_id"`
}
func InfoGet(w http.ResponseWriter, r *http.Request, user *ssh.User) (interface{}, int) {
return infoGetResponse{
ContainerID: user.Container.FullContainerID,
}, http.StatusOK
}