code.gitea.io/gitea@v1.19.3/modules/structs/settings.go (about)

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