aboutsummaryrefslogtreecommitdiffstats
path: root/modules/structs/org.go
diff options
context:
space:
mode:
authorRichard Mahn <richmahn@users.noreply.github.com>2019-05-30 13:57:55 -0400
committertechknowlogick <techknowlogick@gitea.io>2019-05-30 13:57:55 -0400
commit43cf2f3b55de4a69183966da2a6e0167592c733c (patch)
treebdc943cdb6aabe6b48f5f3222ebb6587ae8cd70e /modules/structs/org.go
parentd95caf50ec9e34a652a0e51baf5037c8cf424a01 (diff)
downloadgitea-43cf2f3b55de4a69183966da2a6e0167592c733c.tar.gz
gitea-43cf2f3b55de4a69183966da2a6e0167592c733c.zip
Fixes #7023 - API Org Visibility (#7028)
Diffstat (limited to 'modules/structs/org.go')
-rw-r--r--modules/structs/org.go33
1 files changed, 19 insertions, 14 deletions
diff --git a/modules/structs/org.go b/modules/structs/org.go
index fd15da1ce9..08ab139975 100644
--- a/modules/structs/org.go
+++ b/modules/structs/org.go
@@ -6,25 +6,27 @@ package structs
// Organization represents an organization
type Organization struct {
- ID int64 `json:"id"`
- UserName string `json:"username"`
- FullName string `json:"full_name"`
- AvatarURL string `json:"avatar_url"`
- Description string `json:"description"`
- Website string `json:"website"`
- Location string `json:"location"`
- Visibility VisibleType `json:"visibility"`
+ ID int64 `json:"id"`
+ UserName string `json:"username"`
+ FullName string `json:"full_name"`
+ AvatarURL string `json:"avatar_url"`
+ Description string `json:"description"`
+ Website string `json:"website"`
+ Location string `json:"location"`
+ Visibility string `json:"visibility"`
}
// CreateOrgOption options for creating an organization
type CreateOrgOption struct {
// required: true
- UserName string `json:"username" binding:"Required"`
- FullName string `json:"full_name"`
- Description string `json:"description"`
- Website string `json:"website"`
- Location string `json:"location"`
- Visibility VisibleType `json:"visibility"`
+ UserName string `json:"username" binding:"Required"`
+ FullName string `json:"full_name"`
+ Description string `json:"description"`
+ Website string `json:"website"`
+ Location string `json:"location"`
+ // possible values are `public` (default), `limited` or `private`
+ // enum: public,limited,private
+ Visibility string `json:"visibility" binding:"In(,public,limited,private)"`
}
// EditOrgOption options for editing an organization
@@ -33,4 +35,7 @@ type EditOrgOption struct {
Description string `json:"description"`
Website string `json:"website"`
Location string `json:"location"`
+ // possible values are `public`, `limited` or `private`
+ // enum: public,limited,private
+ Visibility string `json:"visibility" binding:"In(,public,limited,private)"`
}