/
conf_min_shared.go
54 lines (52 loc) · 1.48 KB
/
conf_min_shared.go
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package config
type MinimumRepoConfig struct {
DataStores []DatastoreConfig `yaml:"datastores"`
Archiving ArchivingConfig `yaml:"archiving"`
Uploads UploadsConfig `yaml:"uploads"`
Identicons IdenticonsConfig `yaml:"identicons"`
Quarantine QuarantineConfig `yaml:"quarantine"`
TimeoutSeconds TimeoutsConfig `yaml:"timeouts"`
Features FeatureConfig `yaml:"featureSupport"`
AccessTokens AccessTokenConfig `yaml:"accessTokens"`
}
func NewDefaultMinimumRepoConfig() MinimumRepoConfig {
return MinimumRepoConfig{
DataStores: []DatastoreConfig{},
Archiving: ArchivingConfig{
Enabled: true,
SelfService: false,
TargetBytesPerPart: 209715200, // 200mb
},
Uploads: UploadsConfig{
MaxSizeBytes: 104857600, // 100mb
MinSizeBytes: 100,
ReportedMaxSizeBytes: 0,
MaxPending: 5,
MaxAgeSeconds: 1800, // 30 minutes
Quota: QuotasConfig{
Enabled: false,
UserQuotas: []QuotaUserConfig{},
},
},
Identicons: IdenticonsConfig{
Enabled: true,
},
Quarantine: QuarantineConfig{
ReplaceThumbnails: true,
ReplaceDownloads: false,
ThumbnailPath: "",
AllowLocalAdmins: true,
},
TimeoutSeconds: TimeoutsConfig{
UrlPreviews: 10,
ClientServer: 30,
Federation: 120,
},
Features: FeatureConfig{},
AccessTokens: AccessTokenConfig{
MaxCacheTimeSeconds: 0,
UseAppservices: false,
Appservices: []AppserviceConfig{},
},
}
}