summaryrefslogtreecommitdiffstats
path: root/modules/auth/repo_form.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-08-28 18:33:09 +0800
committerUnknwon <u@gogs.io>2015-08-28 18:33:09 +0800
commitbb3b90fcd640f8b80c70a87ec110acba3d3d9c68 (patch)
tree898fa1a7a5a650c73fb8028beb9d160fbf944c51 /modules/auth/repo_form.go
parent46bee50e45ef8f3e9f3727649fa24d50bb2fc782 (diff)
downloadgitea-bb3b90fcd640f8b80c70a87ec110acba3d3d9c68.tar.gz
gitea-bb3b90fcd640f8b80c70a87ec110acba3d3d9c68.zip
#1487 Readme Template
Diffstat (limited to 'modules/auth/repo_form.go')
-rw-r--r--modules/auth/repo_form.go21
1 files changed, 10 insertions, 11 deletions
diff --git a/modules/auth/repo_form.go b/modules/auth/repo_form.go
index bdfa412c03..748bfa6111 100644
--- a/modules/auth/repo_form.go
+++ b/modules/auth/repo_form.go
@@ -16,19 +16,15 @@ import (
// |____|_ /_______ / |____| \_______ /_______ /|___| |____| \_______ /____|_ // ______|
// \/ \/ \/ \/ \/ \/ \/
-type RepoForm struct {
+type CreateRepoForm struct {
Uid int64 `binding:"Required"`
RepoName string `binding:"Required;AlphaDashDot;MaxSize(100)"`
Private bool
Description string `binding:"MaxSize(255)"`
-}
-
-type CreateRepoForm struct {
- RepoForm
- AutoInit bool
- Gitignores string
- License string
- Readme string
+ AutoInit bool
+ Gitignores string
+ License string
+ Readme string
}
func (f *CreateRepoForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
@@ -39,8 +35,11 @@ type MigrateRepoForm struct {
CloneAddr string `binding:"Required"`
AuthUsername string
AuthPassword string
- RepoForm
- Mirror bool
+ Mirror bool
+ Uid int64 `binding:"Required"`
+ RepoName string `binding:"Required;AlphaDashDot;MaxSize(100)"`
+ Private bool
+ Description string `binding:"MaxSize(255)"`
}
func (f *MigrateRepoForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {