X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=lib%2Fxdsserver%2Fapiv1-config.go;fp=lib%2Fapiv1%2Fconfig.go;h=5a5bb6e3a607460989be49499ee2dba47bfdc67a;hb=2f7828d01f4c4ca2909f95f098627cd5475ed225;hp=4b532175dfb7ef13c2c48d637e005a0246104a29;hpb=5caebfb4b7c3b73988f067082b219ce5b7f409ba;p=src%2Fxds%2Fxds-server.git diff --git a/lib/apiv1/config.go b/lib/xdsserver/apiv1-config.go similarity index 78% rename from lib/apiv1/config.go rename to lib/xdsserver/apiv1-config.go index 4b53217..5a5bb6e 100644 --- a/lib/apiv1/config.go +++ b/lib/xdsserver/apiv1-config.go @@ -1,4 +1,4 @@ -package apiv1 +package xdsserver import ( "net/http" @@ -6,7 +6,7 @@ import ( "github.com/gin-gonic/gin" common "github.com/iotbzh/xds-common/golib" - "github.com/iotbzh/xds-server/lib/xdsconfig" + "github.com/iotbzh/xds-server/lib/xsapiv1" ) var confMut sync.Mutex @@ -16,7 +16,7 @@ func (s *APIService) getConfig(c *gin.Context) { confMut.Lock() defer confMut.Unlock() - c.JSON(http.StatusOK, s.cfg) + c.JSON(http.StatusOK, s.Config) } // SetConfig sets server configuration @@ -24,7 +24,7 @@ func (s *APIService) setConfig(c *gin.Context) { // FIXME - must be tested c.JSON(http.StatusNotImplemented, "Not implemented") - var cfgArg xdsconfig.Config + var cfgArg xsapiv1.APIConfig if c.BindJSON(&cfgArg) != nil { common.APIError(c, "Invalid arguments") @@ -34,7 +34,7 @@ func (s *APIService) setConfig(c *gin.Context) { confMut.Lock() defer confMut.Unlock() - s.log.Debugln("SET config: ", cfgArg) + s.Log.Debugln("SET config: ", cfgArg) common.APIError(c, "Not Supported") }