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

settings.go 1.4 kB

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright 2020 The Gitea Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package structs
  5. // GeneralRepoSettings contains global repository settings exposed by API
  6. type GeneralRepoSettings struct {
  7. MirrorsDisabled bool `json:"mirrors_disabled"`
  8. HTTPGitDisabled bool `json:"http_git_disabled"`
  9. MigrationsDisabled bool `json:"migrations_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. }
  18. // GeneralAPISettings contains global api settings exposed by it
  19. type GeneralAPISettings struct {
  20. MaxResponseItems int `json:"max_response_items"`
  21. DefaultPagingNum int `json:"default_paging_num"`
  22. DefaultGitTreesPerPage int `json:"default_git_trees_per_page"`
  23. DefaultMaxBlobSize int64 `json:"default_max_blob_size"`
  24. }
  25. // GeneralAttachmentSettings contains global Attachment settings exposed by API
  26. type GeneralAttachmentSettings struct {
  27. Enabled bool `json:"enabled"`
  28. AllowedTypes string `json:"allowed_types"`
  29. MaxSize int64 `json:"max_size"`
  30. MaxFiles int `json:"max_files"`
  31. }