mirror of
https://github.com/minio/minio.git
synced 2025-11-09 21:49:46 -05:00
Order all keys in config (#8541)
New changes - return default values when sub-sys is not configured. - state is hidden parameter now - remove worm mode to be saved in config
This commit is contained in:
@@ -48,10 +48,18 @@ const (
|
||||
// DefaultKVS - default KV config for compression settings
|
||||
var (
|
||||
DefaultKVS = config.KVS{
|
||||
config.State: config.StateOff,
|
||||
config.Comment: "This is a default compression configuration",
|
||||
Extensions: DefaultExtensions,
|
||||
MimeTypes: DefaultMimeTypes,
|
||||
config.KV{
|
||||
Key: config.State,
|
||||
Value: config.StateOff,
|
||||
},
|
||||
config.KV{
|
||||
Key: Extensions,
|
||||
Value: DefaultExtensions,
|
||||
},
|
||||
config.KV{
|
||||
Key: MimeTypes,
|
||||
Value: DefaultMimeTypes,
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -21,22 +21,17 @@ import "github.com/minio/minio/cmd/config"
|
||||
// Help template for compress feature.
|
||||
var (
|
||||
Help = config.HelpKVS{
|
||||
config.HelpKV{
|
||||
Key: config.State,
|
||||
Description: "Indicates if compression is enabled or not",
|
||||
Type: "on|off",
|
||||
},
|
||||
config.HelpKV{
|
||||
Key: Extensions,
|
||||
Description: `Comma separated file extensions to compress eg: ".txt,.log,.csv"`,
|
||||
Optional: true,
|
||||
Type: "delimited-string",
|
||||
Type: "csv",
|
||||
},
|
||||
config.HelpKV{
|
||||
Key: MimeTypes,
|
||||
Description: `Comma separate wildcard mime-types to compress eg: "text/*,application/json,application/xml"`,
|
||||
Optional: true,
|
||||
Type: "delimited-string",
|
||||
Type: "csv",
|
||||
},
|
||||
config.HelpKV{
|
||||
Key: config.Comment,
|
||||
|
||||
@@ -35,8 +35,17 @@ func SetCompressionConfig(s config.Config, cfg Config) {
|
||||
return
|
||||
}
|
||||
s[config.CompressionSubSys][config.Default] = config.KVS{
|
||||
config.State: config.StateOn,
|
||||
Extensions: strings.Join(cfg.Extensions, config.ValueSeparator),
|
||||
MimeTypes: strings.Join(cfg.MimeTypes, config.ValueSeparator),
|
||||
config.KV{
|
||||
Key: config.State,
|
||||
Value: config.StateOn,
|
||||
},
|
||||
config.KV{
|
||||
Key: Extensions,
|
||||
Value: strings.Join(cfg.Extensions, config.ValueSeparator),
|
||||
},
|
||||
config.KV{
|
||||
Key: MimeTypes,
|
||||
Value: strings.Join(cfg.MimeTypes, config.ValueSeparator),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user