本站源代码
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

44 lignes
1.8KB

  1. // Copyright 2015 The Gogs Authors. All rights reserved.
  2. // Copyright 2019 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. // CreateUserOption create user options
  7. type CreateUserOption struct {
  8. SourceID int64 `json:"source_id"`
  9. LoginName string `json:"login_name"`
  10. // required: true
  11. Username string `json:"username" binding:"Required;AlphaDashDot;MaxSize(40)"`
  12. FullName string `json:"full_name" binding:"MaxSize(100)"`
  13. // required: true
  14. // swagger:strfmt email
  15. Email string `json:"email" binding:"Required;Email;MaxSize(254)"`
  16. // required: true
  17. Password string `json:"password" binding:"Required;MaxSize(255)"`
  18. MustChangePassword *bool `json:"must_change_password"`
  19. SendNotify bool `json:"send_notify"`
  20. }
  21. // EditUserOption edit user options
  22. type EditUserOption struct {
  23. SourceID int64 `json:"source_id"`
  24. LoginName string `json:"login_name"`
  25. FullName string `json:"full_name" binding:"MaxSize(100)"`
  26. // required: true
  27. // swagger:strfmt email
  28. Email string `json:"email" binding:"Required;Email;MaxSize(254)"`
  29. Password string `json:"password" binding:"MaxSize(255)"`
  30. MustChangePassword *bool `json:"must_change_password"`
  31. Website string `json:"website" binding:"MaxSize(50)"`
  32. Location string `json:"location" binding:"MaxSize(50)"`
  33. Active *bool `json:"active"`
  34. Admin *bool `json:"admin"`
  35. AllowGitHook *bool `json:"allow_git_hook"`
  36. AllowImportLocal *bool `json:"allow_import_local"`
  37. MaxRepoCreation *int `json:"max_repo_creation"`
  38. ProhibitLogin *bool `json:"prohibit_login"`
  39. AllowCreateOrganization *bool `json:"allow_create_organization"`
  40. }
上海开阖软件有限公司 沪ICP备12045867号-1