aboutsummaryrefslogtreecommitdiffstats
path: root/modules/auth/org.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2016-11-27 14:03:59 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2016-11-27 21:39:06 +0800
commitec87a75c000d52bfc2a8dcfc7097c14fe872c376 (patch)
treed849fb1070fe15136538404127099e9a7e0dd302 /modules/auth/org.go
parente6da2cf2cbff4d550cf938548233a59ceef6528e (diff)
downloadgitea-ec87a75c000d52bfc2a8dcfc7097c14fe872c376.tar.gz
gitea-ec87a75c000d52bfc2a8dcfc7097c14fe872c376.zip
golint fixed for modules/auth
Diffstat (limited to 'modules/auth/org.go')
-rw-r--r--modules/auth/org.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/auth/org.go b/modules/auth/org.go
index 53ef6245d9..e15cba0f9f 100644
--- a/modules/auth/org.go
+++ b/modules/auth/org.go
@@ -16,14 +16,17 @@ import (
// \_______ /__| \___ (____ /___| /__/_____ \(____ /__| |__|\____/|___| /
// \/ /_____/ \/ \/ \/ \/ \/
+// CreateOrgForm form for creating organization
type CreateOrgForm struct {
OrgName string `binding:"Required;AlphaDashDot;MaxSize(35)" locale:"org.org_name_holder"`
}
+// Validate valideates the fields
func (f *CreateOrgForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
return validate(errs, ctx.Data, f, ctx.Locale)
}
+// UpdateOrgSettingForm form for updating organization settings
type UpdateOrgSettingForm struct {
Name string `binding:"Required;AlphaDashDot;MaxSize(35)" locale:"org.org_name_holder"`
FullName string `binding:"MaxSize(100)"`
@@ -33,6 +36,7 @@ type UpdateOrgSettingForm struct {
MaxRepoCreation int
}
+// Validate valideates the fields
func (f *UpdateOrgSettingForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
return validate(errs, ctx.Data, f, ctx.Locale)
}
@@ -44,12 +48,14 @@ func (f *UpdateOrgSettingForm) Validate(ctx *macaron.Context, errs binding.Error
// |____| \___ >____ /__|_| /
// \/ \/ \/
+// CreateTeamForm form for creating team
type CreateTeamForm struct {
TeamName string `binding:"Required;AlphaDashDot;MaxSize(30)"`
Description string `binding:"MaxSize(255)"`
Permission string
}
+// Validate valideates the fields
func (f *CreateTeamForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
return validate(errs, ctx.Data, f, ctx.Locale)
}