basic server/client http communication setup

This commit is contained in:
2020-06-06 21:02:58 -04:00
parent 23dd5090e3
commit dd3fd7c4ae
9 changed files with 65 additions and 93 deletions

View File

@@ -1,7 +1,19 @@
package engine
import "github.com/labstack/echo"
import (
"net/http"
func (server *GVCServer) Info(context echo.Context) {
"github.com/labstack/echo"
)
// GetInfo return the relevant repo specific info to the client
func (Server *GVCServer) GetInfo(context echo.Context) error {
repo := context.Param("repoName")
return context.JSON(http.StatusAccepted, repo)
}
// Hello just verifies the server is running //TODO remove this, just extra shit we are sending
func (Server *GVCServer) Hello(context echo.Context) error {
helloMsg := "server alive"
return context.JSON(http.StatusOK, helloMsg)
}