本站源代码
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

41 Zeilen
1.6KB

  1. // Copyright 2016 The Gogs Authors. All rights reserved.
  2. // Copyright 2018 The Gitea Authors. All rights reserved.
  3. // Use of this source code is governed by a MIT-style
  4. // license that can be found in the LICENSE file.
  5. package structs
  6. // Team represents a team in an organization
  7. type Team struct {
  8. ID int64 `json:"id"`
  9. Name string `json:"name"`
  10. Description string `json:"description"`
  11. Organization *Organization `json:"organization"`
  12. // enum: none,read,write,admin,owner
  13. Permission string `json:"permission"`
  14. // example: ["repo.code","repo.issues","repo.ext_issues","repo.wiki","repo.pulls","repo.releases","repo.ext_wiki"]
  15. Units []string `json:"units"`
  16. }
  17. // CreateTeamOption options for creating a team
  18. type CreateTeamOption struct {
  19. // required: true
  20. Name string `json:"name" binding:"Required;AlphaDashDot;MaxSize(30)"`
  21. Description string `json:"description" binding:"MaxSize(255)"`
  22. // enum: read,write,admin
  23. Permission string `json:"permission"`
  24. // example: ["repo.code","repo.issues","repo.ext_issues","repo.wiki","repo.pulls","repo.releases","repo.ext_wiki"]
  25. Units []string `json:"units"`
  26. }
  27. // EditTeamOption options for editing a team
  28. type EditTeamOption struct {
  29. // required: true
  30. Name string `json:"name" binding:"Required;AlphaDashDot;MaxSize(30)"`
  31. Description string `json:"description" binding:"MaxSize(255)"`
  32. // enum: read,write,admin
  33. Permission string `json:"permission"`
  34. // example: ["repo.code","repo.issues","repo.ext_issues","repo.wiki","repo.pulls","repo.releases","repo.ext_wiki"]
  35. Units []string `json:"units"`
  36. }
上海开阖软件有限公司 沪ICP备12045867号-1