summaryrefslogtreecommitdiffstats
path: root/vendor/code.gitea.io/sdk/gitea
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/code.gitea.io/sdk/gitea')
-rw-r--r--vendor/code.gitea.io/sdk/gitea/miscellaneous.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/vendor/code.gitea.io/sdk/gitea/miscellaneous.go b/vendor/code.gitea.io/sdk/gitea/miscellaneous.go
index 30aaee77c8..dc56177ca6 100644
--- a/vendor/code.gitea.io/sdk/gitea/miscellaneous.go
+++ b/vendor/code.gitea.io/sdk/gitea/miscellaneous.go
@@ -11,3 +11,14 @@ type MarkdownOption struct {
Context string
Wiki bool
}
+
+// ServerVersion wraps the version of the server
+type ServerVersion struct {
+ Version string
+}
+
+// ServerVersion returns the version of the server
+func (c *Client) ServerVersion() (string, error) {
+ v := ServerVersion{}
+ return v.Version, c.getParsedResponse("GET", "/api/v1/version", nil, nil, &v)
+}