summaryrefslogtreecommitdiffstats
path: root/modules/setting/quota.go
blob: 05e14baa9c4b383a1a990fdf6e33e193f2148123 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright 2024 The Forgejo Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package setting

// Quota settings
var Quota = struct {
	Enabled       bool     `ini:"ENABLED"`
	DefaultGroups []string `ini:"DEFAULT_GROUPS"`

	Default struct {
		Total int64
	} `ini:"quota.default"`
}{
	Enabled:       false,
	DefaultGroups: []string{},
	Default: struct {
		Total int64
	}{
		Total: -1,
	},
}

func loadQuotaFrom(rootCfg ConfigProvider) {
	mustMapSetting(rootCfg, "quota", &Quota)
}