2c2547c162ffa9704df2e5f6e36cf29ed7961ae1
[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 }