blob: 8f928ec1d0bd7f09d270931dea72e2dec3b5e8a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
package apiv1
import (
"net/http"
"github.com/gin-gonic/gin"
)
type version struct {
ID string `json:"id"`
Version string `json:"version"`
APIVersion string `json:"apiVersion"`
VersionGitTag string `json:"gitTag"`
}
// getInfo : return various information about server
func (s *APIService) getVersion(c *gin.Context) {
response := version{
ID: s.cfg.ServerUID,
Version: s.cfg.Version,
APIVersion: s.cfg.APIVersion,
VersionGitTag: s.cfg.VersionGitTag,
}
c.JSON(http.StatusOK, response)
}
|