@@ -67,9 +67,6 @@ type ServerConfig struct {
6767 // Server name.
6868 Name string `yaml:"name" mapstructure:"name"`
6969
70- // Server work home directory.
71- WorkHome string `yaml:"workHome" mapstructure:"workHome"`
72-
7370 // Server dynamic config cache directory.
7471 CacheDir string `yaml:"cacheDir" mapstructure:"cacheDir"`
7572
@@ -91,9 +88,6 @@ type ServerConfig struct {
9188 // Server plugin directory.
9289 PluginDir string `yaml:"pluginDir" mapstructure:"pluginDir"`
9390
94- // Server data directory.
95- DataDir string `yaml:"dataDir" mapstructure:"dataDir"`
96-
9791 // GRPC server configuration.
9892 GRPC GRPCConfig `yaml:"grpc" mapstructure:"grpc"`
9993
@@ -409,17 +403,18 @@ type NetworkConfig struct {
409403 EnableIPv6 bool `mapstructure:"enableIPv6" yaml:"enableIPv6"`
410404}
411405
406+ // AES256 base64 key is 32 bytes.
412407type EncryptionKey [32 ]byte
413408type EncryptionConfig struct {
409+ // Enable encryption.
414410 Enable bool `mapstructure:"enable" yaml:"enable"`
415411 // AES256 base64, optional
416412 Key * EncryptionKey `mapstructure:"key" yaml:"key"`
417413}
418414
419415// UnmarshalText Base64
420416func (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 ))
423418 keyBytes , err := base64 .StdEncoding .DecodeString (string (text ))
424419 if err != nil {
425420 return fmt .Errorf ("invalid base64 key: %v" , err )
0 commit comments