mirror of
https://github.com/grafana/grafana.git
synced 2024-11-25 18:30:41 -06:00
18 lines
494 B
Go
18 lines
494 B
Go
package setting
|
|
|
|
type QuotaSettings struct {
|
|
Enabled bool
|
|
Default map[string]int64
|
|
}
|
|
|
|
func readQuotaSettings() {
|
|
// set global defaults.
|
|
DefaultQuotas := make(map[string]int64)
|
|
quota := Cfg.Section("quota")
|
|
Quota.Enabled = quota.Key("enabled").MustBool(false)
|
|
DefaultQuotas["user"] = quota.Key("user").MustInt64(10)
|
|
DefaultQuotas["data_source"] = quota.Key("data_source").MustInt64(10)
|
|
DefaultQuotas["dashboard"] = quota.Key("dashboard").MustInt64(10)
|
|
Quota.Default = DefaultQuotas
|
|
}
|