You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

settings.go 1.4KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright 2020 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package structs
  4. // GeneralRepoSettings contains global repository settings exposed by API
  5. type GeneralRepoSettings struct {
  6. MirrorsDisabled bool `json:"mirrors_disabled"`
  7. HTTPGitDisabled bool `json:"http_git_disabled"`
  8. MigrationsDisabled bool `json:"migrations_disabled"`
  9. StarsDisabled bool `json:"stars_disabled"`
  10. TimeTrackingDisabled bool `json:"time_tracking_disabled"`
  11. LFSDisabled bool `json:"lfs_disabled"`
  12. }
  13. // GeneralUISettings contains global ui settings exposed by API
  14. type GeneralUISettings struct {
  15. DefaultTheme string `json:"default_theme"`
  16. AllowedReactions []string `json:"allowed_reactions"`
  17. CustomEmojis []string `json:"custom_emojis"`
  18. }
  19. // GeneralAPISettings contains global api settings exposed by it
  20. type GeneralAPISettings struct {
  21. MaxResponseItems int `json:"max_response_items"`
  22. DefaultPagingNum int `json:"default_paging_num"`
  23. DefaultGitTreesPerPage int `json:"default_git_trees_per_page"`
  24. DefaultMaxBlobSize int64 `json:"default_max_blob_size"`
  25. }
  26. // GeneralAttachmentSettings contains global Attachment settings exposed by API
  27. type GeneralAttachmentSettings struct {
  28. Enabled bool `json:"enabled"`
  29. AllowedTypes string `json:"allowed_types"`
  30. MaxSize int64 `json:"max_size"`
  31. MaxFiles int `json:"max_files"`
  32. }