Refit source files to have a public xs-apiv1 lib package.
[src/xds/xds-server.git] / lib / xdsserver / apiv1-version.go
1 package xdsserver
2
3 import (
4         "net/http"
5
6         "github.com/gin-gonic/gin"
7         "github.com/iotbzh/xds-server/lib/xsapiv1"
8 )
9
10 // getInfo : return various information about server
11 func (s *APIService) getVersion(c *gin.Context) {
12         response := xsapiv1.Version{
13                 ID:            s.Config.ServerUID,
14                 Version:       s.Config.Version,
15                 APIVersion:    s.Config.APIVersion,
16                 VersionGitTag: s.Config.VersionGitTag,
17         }
18
19         c.JSON(http.StatusOK, response)
20 }