@@ -67,9 +67,6 @@ type ServerConfig struct {
67
67
// Server name.
68
68
Name string `yaml:"name" mapstructure:"name"`
69
69
70
- // Server work home directory.
71
- WorkHome string `yaml:"workHome" mapstructure:"workHome"`
72
-
73
70
// Server dynamic config cache directory.
74
71
CacheDir string `yaml:"cacheDir" mapstructure:"cacheDir"`
75
72
@@ -91,9 +88,6 @@ type ServerConfig struct {
91
88
// Server plugin directory.
92
89
PluginDir string `yaml:"pluginDir" mapstructure:"pluginDir"`
93
90
94
- // Server data directory.
95
- DataDir string `yaml:"dataDir" mapstructure:"dataDir"`
96
-
97
91
// GRPC server configuration.
98
92
GRPC GRPCConfig `yaml:"grpc" mapstructure:"grpc"`
99
93
@@ -409,17 +403,18 @@ type NetworkConfig struct {
409
403
EnableIPv6 bool `mapstructure:"enableIPv6" yaml:"enableIPv6"`
410
404
}
411
405
406
+ // AES256 base64 key is 32 bytes.
412
407
type EncryptionKey [32 ]byte
413
408
type EncryptionConfig struct {
409
+ // Enable encryption.
414
410
Enable bool `mapstructure:"enable" yaml:"enable"`
415
411
// AES256 base64, optional
416
412
Key * EncryptionKey `mapstructure:"key" yaml:"key"`
417
413
}
418
414
419
415
// UnmarshalText Base64
420
416
func (e * EncryptionKey ) UnmarshalText (text []byte ) error {
421
- // TODO: avoid printing key
422
- logger .Infof ("base64 key str: %s" , string (text ))
417
+ logger .Debugf ("base64 key str: %s" , string (text ))
423
418
keyBytes , err := base64 .StdEncoding .DecodeString (string (text ))
424
419
if err != nil {
425
420
return fmt .Errorf ("invalid base64 key: %v" , err )
0 commit comments