選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

settings.go 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. StarsDisabled bool `json:"stars_disabled"`
  11. TimeTrackingDisabled bool `json:"time_tracking_disabled"`
  12. LFSDisabled bool `json:"lfs_disabled"`
  13. }
  14. // GeneralUISettings contains global ui settings exposed by API
  15. type GeneralUISettings struct {
  16. DefaultTheme string `json:"default_theme"`
  17. AllowedReactions []string `json:"allowed_reactions"`
  18. CustomEmojis []string `json:"custom_emojis"`
  19. }
  20. // GeneralAPISettings contains global api settings exposed by it
  21. type GeneralAPISettings struct {
  22. MaxResponseItems int `json:"max_response_items"`
  23. DefaultPagingNum int `json:"default_paging_num"`
  24. DefaultGitTreesPerPage int `json:"default_git_trees_per_page"`
  25. DefaultMaxBlobSize int64 `json:"default_max_blob_size"`
  26. }
  27. // GeneralAttachmentSettings contains global Attachment settings exposed by API
  28. type GeneralAttachmentSettings struct {
  29. Enabled bool `json:"enabled"`
  30. AllowedTypes string `json:"allowed_types"`
  31. MaxSize int64 `json:"max_size"`
  32. MaxFiles int `json:"max_files"`
  33. }