summaryrefslogtreecommitdiffstats
path: root/services/forms/runner.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--services/forms/runner.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/services/forms/runner.go b/services/forms/runner.go
new file mode 100644
index 0000000..6abfc66
--- /dev/null
+++ b/services/forms/runner.go
@@ -0,0 +1,24 @@
+// Copyright 2022 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package forms
+
+import (
+ "net/http"
+
+ "code.gitea.io/gitea/modules/web/middleware"
+ "code.gitea.io/gitea/services/context"
+
+ "gitea.com/go-chi/binding"
+)
+
+// EditRunnerForm form for admin to create runner
+type EditRunnerForm struct {
+ Description string
+}
+
+// Validate validates form fields
+func (f *EditRunnerForm) Validate(req *http.Request, errs binding.Errors) binding.Errors {
+ ctx := context.GetValidateContext(req)
+ return middleware.Validate(errs, ctx.Data, f, ctx.Locale)
+}