aboutsummaryrefslogtreecommitdiff
path: root/modules/auth/repo_form.go
diff options
context:
space:
mode:
authorMartin Hartkorn <github@hartkorn.net>2016-02-14 21:12:00 +0100
committerMartin Hartkorn <github@hartkorn.net>2016-02-14 21:12:00 +0100
commit3650bd8528a8c0f43eb3d9083939735bf740fa3b (patch)
tree267f881bfb964101b66aef2973d8e27c440ffd41 /modules/auth/repo_form.go
parent10e4887b2bf2e201c7acc38f09731a218ae1a7bc (diff)
Convert mirrors to regular repositories.
Diffstat (limited to 'modules/auth/repo_form.go')
-rw-r--r--modules/auth/repo_form.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/auth/repo_form.go b/modules/auth/repo_form.go
index bd68feaf..5853c2c0 100644
--- a/modules/auth/repo_form.go
+++ b/modules/auth/repo_form.go
@@ -37,6 +37,18 @@ func (f *CreateRepoForm) Validate(ctx *macaron.Context, errs binding.Errors) bin
return validate(errs, ctx.Data, f, ctx.Locale)
}
+type ConvertRepoForm struct {
+ Uid int64 `binding:"Required"`
+ RepoId int64 `binding:"Required"`
+ RepoName string `binding:"Required;AlphaDashDot;MaxSize(100)"`
+ Private bool
+ Description string `binding:"MaxSize(255)"`
+}
+
+func (f *ConvertRepoForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
+ return validate(errs, ctx.Data, f, ctx.Locale)
+}
+
type MigrateRepoForm struct {
CloneAddr string `json:"clone_addr" binding:"Required"`
AuthUsername string `json:"auth_username"`