summaryrefslogtreecommitdiffstats
path: root/modules/structs/miscellaneous.go
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2024-10-18 20:33:49 +0200
committerDaniel Baumann <daniel@debian.org>2024-12-12 23:57:56 +0100
commite68b9d00a6e05b3a941f63ffb696f91e554ac5ec (patch)
tree97775d6c13b0f416af55314eb6a89ef792474615 /modules/structs/miscellaneous.go
parentInitial commit. (diff)
downloadforgejo-e68b9d00a6e05b3a941f63ffb696f91e554ac5ec.tar.xz
forgejo-e68b9d00a6e05b3a941f63ffb696f91e554ac5ec.zip
Adding upstream version 9.0.3.
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to '')
-rw-r--r--modules/structs/miscellaneous.go101
1 files changed, 101 insertions, 0 deletions
diff --git a/modules/structs/miscellaneous.go b/modules/structs/miscellaneous.go
new file mode 100644
index 0000000..bff10f9
--- /dev/null
+++ b/modules/structs/miscellaneous.go
@@ -0,0 +1,101 @@
+// Copyright 2015 The Gogs Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package structs
+
+// SearchResults results of a successful search
+type SearchResults struct {
+ OK bool `json:"ok"`
+ Data []*Repository `json:"data"`
+}
+
+// SearchError error of a failed search
+type SearchError struct {
+ OK bool `json:"ok"`
+ Error string `json:"error"`
+}
+
+// MarkupOption markup options
+type MarkupOption struct {
+ // Text markup to render
+ //
+ // in: body
+ Text string
+ // Mode to render (comment, gfm, markdown, file)
+ //
+ // in: body
+ Mode string
+ // Context to render
+ //
+ // in: body
+ Context string
+ // Is it a wiki page ?
+ //
+ // in: body
+ Wiki bool
+ // File path for detecting extension in file mode
+ //
+ // in: body
+ FilePath string
+}
+
+// MarkupRender is a rendered markup document
+// swagger:response MarkupRender
+type MarkupRender string
+
+// MarkdownOption markdown options
+type MarkdownOption struct {
+ // Text markdown to render
+ //
+ // in: body
+ Text string
+ // Mode to render (comment, gfm, markdown)
+ //
+ // in: body
+ Mode string
+ // Context to render
+ //
+ // in: body
+ Context string
+ // Is it a wiki page ?
+ //
+ // in: body
+ Wiki bool
+}
+
+// MarkdownRender is a rendered markdown document
+// swagger:response MarkdownRender
+type MarkdownRender string
+
+// ServerVersion wraps the version of the server
+type ServerVersion struct {
+ Version string `json:"version"`
+}
+
+// GitignoreTemplateInfo name and text of a gitignore template
+type GitignoreTemplateInfo struct {
+ Name string `json:"name"`
+ Source string `json:"source"`
+}
+
+// LicensesListEntry is used for the API
+type LicensesTemplateListEntry struct {
+ Key string `json:"key"`
+ Name string `json:"name"`
+ URL string `json:"url"`
+}
+
+// LicensesInfo contains information about a License
+type LicenseTemplateInfo struct {
+ Key string `json:"key"`
+ Name string `json:"name"`
+ URL string `json:"url"`
+ Implementation string `json:"implementation"`
+ Body string `json:"body"`
+}
+
+// APIError is an api error with a message
+type APIError struct {
+ Message string `json:"message"`
+ URL string `json:"url"`
+}