blob: e0224419ec201e21eb474b4d93be0ba3e069c5a0 (
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
|
package apiv1
import (
"net/http"
"github.com/gin-gonic/gin"
)
type version struct {
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{
Version: s.cfg.Version,
APIVersion: s.cfg.APIVersion,
VersionGitTag: s.cfg.VersionGitTag,
}
c.JSON(http.StatusOK, response)
}
|