robotfs/config/robotfs.go
2025-05-15 18:09:59 +08:00

34 lines
855 B
Go

package config
type RobotFSConfig struct {
Address string `mapstructure:"address"`
LogPath string `mapstructure:"log_path"`
}
type RedisConfig struct {
Address string `mapstructure:"address"`
Password string `mapstructure:"password"`
DB int `mapstructure:"db"`
}
type S3Config 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"`
}
type Config struct {
RobotFS RobotFSConfig `mapstructure:"robotfs"`
Redis RedisConfig `mapstructure:"redis"`
S3 S3Config `mapstructure:"s3"`
}
func GetConfig() *Config {
config := &Config{}
return config
}