robotfs/config/security.go
2025-05-12 20:23:33 +08:00

30 lines
768 B
Go

package config
type Config struct {
Robotfs struct {
Address string `mapstructure:"ADDRESS"`
LogPath string `mapstructure:"LOGPATH"`
} `mapstructure:"robotfs"`
Redis struct {
Address string `mapstructure:"address"`
Password string `mapstructure:"password"`
DB int `mapstructure:"db"`
} `mapstructure:"redis"`
S3 struct {
Region string `mapstructure:"region"`
Endpoint string `mapstructure:"endpoint"`
AccessKeyID string `mapstructure:"access_key_id"`
SecretAccessKey string `mapstructure:"secret_access_key"`
BucketName string `mapstructure:"bucket_name"`
UsePathStyle bool `mapstructure:"use_path_style"`
} `mapstructure:"s3"`
}
func GetConfig() *Config {
config := &Config{}
return config
}