summaryrefslogtreecommitdiffstats
path: root/modules/structs/variable.go
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2024-10-18 20:33:49 +0200
committerDaniel Baumann <daniel@debian.org>2024-10-18 20:33:49 +0200
commitdd136858f1ea40ad3c94191d647487fa4f31926c (patch)
tree58fec94a7b2a12510c9664b21793f1ed560c6518 /modules/structs/variable.go
parentInitial commit. (diff)
downloadforgejo-ef5d5baef09ca06d3e8d67f7a39f7c57e6671b5b.tar.xz
forgejo-ef5d5baef09ca06d3e8d67f7a39f7c57e6671b5b.zip
Adding upstream version 9.0.0.HEADupstream/9.0.0upstreamdebian
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to 'modules/structs/variable.go')
-rw-r--r--modules/structs/variable.go37
1 files changed, 37 insertions, 0 deletions
diff --git a/modules/structs/variable.go b/modules/structs/variable.go
new file mode 100644
index 0000000..cc846cf
--- /dev/null
+++ b/modules/structs/variable.go
@@ -0,0 +1,37 @@
+// Copyright 2024 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package structs
+
+// CreateVariableOption the option when creating variable
+// swagger:model
+type CreateVariableOption struct {
+ // Value of the variable to create
+ //
+ // required: true
+ Value string `json:"value" binding:"Required"`
+}
+
+// UpdateVariableOption the option when updating variable
+// swagger:model
+type UpdateVariableOption struct {
+ // New name for the variable. If the field is empty, the variable name won't be updated.
+ Name string `json:"name"`
+ // Value of the variable to update
+ //
+ // required: true
+ Value string `json:"value" binding:"Required"`
+}
+
+// ActionVariable return value of the query API
+// swagger:model
+type ActionVariable struct {
+ // the owner to which the variable belongs
+ OwnerID int64 `json:"owner_id"`
+ // the repository to which the variable belongs
+ RepoID int64 `json:"repo_id"`
+ // the name of the variable
+ Name string `json:"name"`
+ // the value of the variable
+ Data string `json:"data"`
+}